pwTrajectoriesOfManyParameterSettings
[values, labels, K, Kcomplete, IDsComplete] = pwTrajectoriesOfManyParameterSettings(...
K, percentage, selected, IDs, doFit, ...
userFunction, userFunctionArguments,
useSavedTrajectories)
The system will be integrated size(K, 1) times.
The trajectories will be plotted in one figure, so that
the distribution of trajectories is visible.
Arguments
K(i,j) is a parameter matrix of the currently fitted parameters.
i represents the i-th setting of parameter value.
j represents parameter j or to parameter IDs{j} if specified.
Instead of K also an array of fits can be specified. Then, the
percentage argument will be ignored.
If no K and not fits are given, the last fit sequence will be used.
Here, the specified percentage can be used to consider only the best fits.
If the data is fitted, K may change. The changes are available
in the third output argument.
selected: true or false (default)
If true: The selected couples of the repository
list will be used.
If false: All currently combined couples will be used.
doFit: true or false (default)
If true: The model will be fitted for each row of the Kcomplete matrix
and then drawn.
userFunction: Name of a user supplied function with the signature:
[values, labels] = userFunction(couples)
where couples is a struct array with at least the following fields:
couples(i).modelID
.dataID
.xIDs
.yIDs
.zIDs
.uIDs
.stimuli(j).tFine
.stimuli(j).uFine
.stimuli(j).xFine
.stimuli(j).yFine
.stimuli(j).zFine
.stimlui(j).tForFit
.stimlui(j).uForFit
.stimlui(j).xForFit
.stimlui(j).yForFit
.stimlui(j).yDataForFit (fitted data)
.stimlui(j).yDataStdForFit (standard deviations)
.stimlui(j).zForFit
1 <= i <= length(couples)
1 <= j <= length(couples(i).stimuli)
All matrices are of the form time x ID.
values should be a scalar vector of the same length as labels.
userFunctionArguments: Additional arguments for the userFunction as one cell array.
useSavedTrajectories: Instead of a fresh integration of the system, the saved trajectories
from each fit are used. For this,
config.optimization.levelOfHistoryStorage = 3
is required. Use this setting e.g. if integration is time-consuming
and a larger repository file is acceptable.
Example
User function:
function [values, labels] = xMaxValuesFirstCoupleFirstStimulus(couples)
labels = {};
for i=1:length(couples(1).xIDs)
labels{i} = [couples(1).xIDs{i}, ' max'];
end
values = max(couples(1).stimuli(1).xFine);
Keywords: Multi multiple trajectories display
See also