This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.


Get statistics from ensemble run data


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



Column vector of time points

mMatrix of mean values from the ensemble data. The number of rows in m is the length of the time vector t and the number of columns is equal to the number of species.
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 character vectors for the quantity 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.
namesCharacter vector or cell array of character vectors. 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.
interpolationCharacter vector denoting the interpolation method to use for resampling of the data onto a common time vector with the smallest simulation stop time. See resample for a list of interpolation methods. Default is 'linear'.


[t,m] = sbioensemblestats(simDataObj) computes the time-dependent ensemble mean m of the ensemble data simDataObj. If the time vectors of the ensemble data are not identical, by default, the function uses the 'linear' interpolation method to resample the data onto the common time vector. See resample for a list of interpolation methods.

[t,m,v] = sbioensemblestats(simDataObj) also returns the variance v for the ensemble run data simDataObj.

[t,m,v,n] = sbioensemblestats(simDataObj) also returns the names of quantities n corresponding to the mean m and variance v columns. Each column of m or v describes the ensemble mean or variance of a quantity (or state) as a function of time.

[t,m,v,n] = sbioensemblestats(simDataObj,names) computes statistics only for the quantities specified by names.

[t,m,v,n] = sbioensemblestats(simDataObj,names,interpolation) uses the interpolation method interpolation to resample the simulation data to have a consistent time vector. If the time vectors of the ensemble data are not identical and if you do not specify any interpolation method, the function uses the 'linear' interpolation method by default.


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.

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

Introduced in R2006a

Was this topic helpful?