sbiosubplot

Plot simulation results in subplots

Syntax

sbiosubplot(simDataObj)
sbiosubplot(simDataObj, fcnHandleValue, xArgsValue, yArgsValue)
sbiosubplot(simDataObj, fcnHandleValue, xArgsValue, yArgsValue, showLegendValue)

Arguments

simDataObj

SimBiology® data object.

fcnHandleValue

Function handle.

xArgsValue

Cell array with the names of the states.

yArgsValue

Cell array with the names of the states.

showLegendValue

Boolean (default is false).

Description

sbiosubplot(simDataObj) plots each simulation run for SimBiology data object, simDataObj into its own subplot. The subplot is a time plot of each state in simDataObj. A legend is included.

sbiosubplot(simDataObj, fcnHandleValue, xArgsValue, yArgsValue) plots each simulation run for the SimBiology data object, simDataObj, into its own subplot. The subplot is plotted by calling the function handle, fcnHandleValue, with input arguments simDataObj, xArgsValue, and yArgsValue.

sbiosubplot(simDataObj, fcnHandleValue, xArgsValue, yArgsValue, showLegendValue) plots each simulation run for the SimBiology data object, simDataObj, into its own subplot. The subplot is plotted by calling the function handle, fcnHandleValue, with input arguments simDataObj, xArgsValue, and yArgsValue. showLegendValue indicates if a legend is shown in the plot. showLegendValue can be either true or false. By default, showLegendValue is false.

Examples

This example shows how to plot data from an ensemble run without interpolation.

% Load the radiodecay model.
        sbioloadproject('radiodecay.sbproj','m1');
 
        % Configure the model to run with the stochastic solver.
        cs = getconfigset(m1, 'active');
        set(cs, 'SolverType', 'ssa');
        set(cs.SolverOptions, 'LogDecimation', 100);
 
        % Run an ensemble simulation and view the results.
        simDataObj = sbioensemblerun(m1, 10, 'linear');
        sbiosubplot(simDataObj);

See Also

Was this topic helpful?