Documentation Center

  • Trial Software
  • Product Updates

sbioensemblestats

Get statistics from ensemble run data

Syntax

[t,m] = sbioensemblestats(simDataObj)
[t,m,v] = sbioensemblestats(simDataObj)
[t,m,v,n] = sbioensemblestats(simDataObj)

Arguments

tVector of doubles that holds the common time vector after interpolation.
mMatrix of mean values from the ensemble data. The number of rows in m is the length of the common time vector t after interpolation and the number of columns is equal to the number of species. The species order corresponding to the columns of m can be obtained from any of the SimData objects in simDataObj using selectbyname.
simDataObjA cell array of SimData objects, where each SimData object holds data for a separate simulation run. All elements of simDataObj must contain data for the same states in the same model. When the time vectors of the elements of simDataObj are not identical, simDataObj is first resampled onto a common time vector (see interpolation below).
vMatrix of variance obtained from the ensemble data. v has the same dimensions as m.
nCell array of strings that holds names whose mean and variance are returned in m and v, respectively. The number of elements in n is the same as the number of columns of m and v. The order of names in n corresponds to the order of columns of m and v.
namesEither a string or a cell array of strings. names may include qualified names such as 'CompartmentName.SpeciesName' or 'ReactionName.ParameterName' to resolve ambiguities. If you specify empty {} for names, sbioensemblestats returns statistics on all time courses contained in simDataObj.
interpolationString variable denoting the interpolation method to be used if data is to be interpolated to get a consistent time vector. See resample for a list of interpolation methods. Default is 'off'. If interpolation is on, the data is interpolated to match the time vector with the smallest simulation stop time.

Description

[t,m] = sbioensemblestats(simDataObj) computes the time-dependent ensemble mean m of the ensemble data simDataObj obtained by running sbioensemblerun.

[t,m,v] = sbioensemblestats(simDataObj) computes the time-dependent ensemble mean m and variance v for the ensemble run data simDataObj.

[t,m,v,n] = sbioensemblestats(simDataObj) computes the time-dependent ensemble mean m and variance v for the ensemble run data simDataObj. Each column of m or v describes the ensemble mean or variance of some state as a function of time.

Examples

The project file, radiodecay.sbproj, contains a model stored in a variable called m1. Load m1 into the MATLAB® workspace.

  1. Load a SimBiology® model m1 from a SimBiology project file.

    sbioloadproject('radiodecay.sbproj','m1');
  2. Change the solver of the active configuration set to be ssa. Also, adjust the LogDecimation property on the SolverOptions property of the configuration set.

    cs = getconfigset(m1, 'active');
    set(cs, 'SolverType', 'ssa');
    so = get(cs, 'SolverOptions');
    set(so, 'LogDecimation', 10);
  3. Perform an ensemble of 20 runs with no interpolation.

    simDataObj = sbioensemblerun(m1, 20);
  4. Get ensemble statistics for all species using the default interpolation method.

    [T,M,V] = sbioensemblestats(simDataObj);
  5. Get ensemble statistics for a specific species using the default interpolation scheme.

    [T2,M2,V2] = sbioensemblestats(simDataObj, {'z'});

See Also

| |

Was this topic helpful?