selectbyname (SimData) - Select data by name from SimData object array

Syntax

[t,x,n] = selectbyname(simDataObj, 'NameValue')
Out = selectbyname(simDataObj, NameValue, 'Format', Format)

Arguments

Output Arguments

tAn n-by-1 vector of time points.
xAn n-by-m data array. t and names label the rows and columns of x respectively.
nAn m-by-1 cell array of names.
OutData returned in format as specified in 'FormatValue', shown in Input Arguments. Depending on specified 'FormatValue', Out contains one of the following:
  • Structure array

  • SimData object

  • Time series object

  • Combined time series object from array of SimData objects.

Input Arguments

simDataObjSimData object array. Enter a variable name for a SimData object.
NameValueNames of the states for which you want to select data from simDataObj. Must be either a string or a cell array of strings.
QueryA cell array of arguments consisting of some combination of property-name property-value pairs and/or 'Where' clauses. For a more complete description of the query syntax, including 'Where' clauses and their supported condition types see sbioselect. You can use any of the metadata fields available in the cells of the DataInfo property of a SimData object; these include 'Type', 'Name', 'Units', 'Compartment' (species only), or 'Reaction' (parameter only).
FormatValue

Chose a format from the table below.

Available values for FormatValue:

FormatValueDescription
'num'Specifies the format that lets you return data in numeric arrays. This is the default when select is called with two or more output arguments.
'nummetadata'Specifies the format that lets you return a cell array of metadata structures in metadata instead of names. The elements of metadata label the columns of x.
'numqualnames'Specifies the format that lets you return qualified names in names to resolve ambiguities.
'struct'Specifies the format that lets you return a structure array holding both data and metadata. This is the default when you use a single output argument.
'simdata'Specifies the format that lets you return data in a new SimData object. This is the default format when select is called with zero or one output argument.
'ts'Specifies the format that lets you return data in time series objects, creating an individual time series for each state or column and SimData object in simDataObj.
'tslumped'Specifies the format that lets you return data in time series objects, combining data from each SimData object into a single time series.

Description

The selectbyname method allows you to select data from a SimData object array by name. [t,x,n] = selectbyname(simDataObj, 'NameValue') returns time and state data from the SimData object simDataObj for states with names 'NameValue'.

In a SimData object simDataObj, the names labelling the columns of the data matrix simDataObj.Data are given by simDataObj.DataNames. A name specified in 'NameValue' can match more than one data column, for example when simDataObj contains data for a species and parameter both named 'k'. To resolve ambiguities, use qualified names in 'NameValue', such as 'CompartmentName.SpeciesName' or 'ReactionName.ParameterName'. selectbyname returns qualified names in the output argument names when there are ambiguities.

Out = selectbyname(simDataObj, NameValue, 'Format', Format) returns the data in the specified format. Valid formats are listed in Input Arguments.

Example

% Get data for the species 'glucose' from the simdata array sdarray.
[t x n] = selectbyname(sdarray,'glucose');
 
% Get data for multiple states and return the results in a struct array.
s = selectbyname(sdarray,{'RexGFP';'nuc.GFP';'cytosol.GFP'},...
                          'Format','struct');

See Also

getdata, sbioselect, sbiosimulate

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS