Description
It may be useful to transform the time to correspond a model to a data set,
e.g. if the measured data has an unknown time-shift which varies from
experiment to experiment.
Currently it is not possible to fit with analytic Jacobian for the
optimization using a time-transformed model.
Only tForFit corresponding to the time-points of the experimental data is changed.
Examples
% Add new parameters via pwAddS and set usedInTimeTransformation to true.
% In order to avoid negative parameters include an offset in the formula
% and start with timeshift > 0, e.g. 10:
% m = pwAddS(m, ID, value, fitSetting, minValue, maxValue, unit, name,
% description, usedInTimeTransformation)
m = pwAddS(m, 'timeshift', 10, 'local', 1, 30, [], [], [], true);
% Set the transformation using the same parameter name:
% m = pwSetTimeTransformation(m, formula)
m = pwSetTimeTransformation(m, 't + timeshift - 10');
% To include a scaling in time:
m = pwSetTimeTransformation(m, 'a*t + b');
% Time shift without offset:
m = pwSetTimeTransformation(m, 't + b');
% To remove the time transformation for the model m, e.g. in a daughter model
m = pwSetTimeTransformation(m, []);