pwGetPlottingData


 [matrix, IDs] = pwGetPlottingData(types, indCouples, indStimuli)

 Returns the same data that is currently plotted with pwDraw.

 

Arguments for pwGetPlottingData

 types      Cell array with one or more of the fields:

            tFine      time (high sampled)
            aFine      algebraic equations
            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)
            aForFit         algebraic equations
            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

            By default the fine sampled data of the currently plotted
            variables is returned.

 indCouples Indeces of combined couple which should be included
            in the trajectory export. By default all couples are included.

 indStimuli Indeces of stimuli.
            If data from more than one couple is extracted, indStimuli
            should be a cell array with indStimuli{i} containing the
            desired stimuli of combined couple i.
            By default all stimuli of the combined couples are extracted.

 matrix     Matrix with length(tFine) or length(tForFit) rows

 IDs        Cell array with the column names of the matrix.
            In case multiple couples or stimuli are exported,
            the ID is extended by "_Ci_Sj" where i and j
            are replaced by the current index of the couple
            and stimulus.

 

Description

 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.

 

Examples

 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'});


See also

pwSavePlottingData
pwGetPlottingData2