[matrix, IDs] = pwGetPlottingData(types, coupleNr, stimulusNr) Returns the same data that is currently plotted with pwDraw.
types Cell array with one or more of the fields:
tFine time (high sampled)
xFine dynamic variables
yFine observations
zFine derived variables
uFine driving input functions
or
tForFit time (sampled as specified in model.t for simulations
or as given in the data set)
xForFit dynamic variables
yDataForFit observations (simulated or external data)
yDataStdForFit standard deviation of observations
residuals weighted distance between model and observations
yForFit observations calculated by the model
coupleNr number of the combined couple (default 1)
stimulusNr number of the stimulus (default 1)
matrix Matrix with length(tFine) or length(tForFit) rows
IDs Cell array with the column names of the matrix
Note that the fine variables can not be combined with the other variables, since the corresponding matrices have a different number of rows. The function pwGetPlottingData2 is the advanced version to get the plotted data.
Example 1: x variables of couple 1, stimulus 1 with high sampling [matrix, IDs] = pwGetPlottingData({'tFine', 'xFine'}, 1, 1); time = matrix(:,1); values = matrix(:, 2:end); Example 2: [matrix, IDs] = pwGetPlottingData({'tForFit', 'yForFit', 'yDataForFit'}); returns a matrix with the fitted data points (assume 3 observables): - First colum are the time points - Columns 2 - 4 are values of the model - Columns 5 - 8 are the original data points In 'IDs' the names of the columns are saved. In order to get the fine sampled curve: [matrix, IDs] = pwGetPlottingData({'tFine', 'yFine'});