Products & Services Solutions Academia Support User Community Company

Learn more about SimBiology   

sbioplot - Plot simulation results in one figure

Syntax

sbioplot(simDataObj)
sbioplot(simDataObj, fcnHandleValue, xArgsValue, yArgsValue)

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.

Description

sbioplot(simDataObj) plots each simulation run for SimBiology data object, simDataObj, in the same figure. The plot is a time plot of each state in simDataObj. The figure also shows a hierarchical display of all the runs in a tree, with the ability of choosing which trajectories to show.

sbioplot(simDataObj, fcnHandleValue, xArgsValue, yArgsValue) plots each simulation run for the SimBiology data object, simDataObj, in the same figure. The plot is created by calling the function handle, fcnHandleValue, with input arguments simDataObj, xArgsValue, and yArgsValue.

xArgsValue and yArgsValue should be cell arrays with the names of the states. The function represented by the function handle should return an array of handles and names. The signature of the function is shown below.

function [handles, names] = functionName(simDataObj, xArgsValue, YArgsValue)

The output argument handles is a two-dimensional array of handles to the lines plotted by the function. Each column corresponds to a run and each row corresponds to the lines being plotted for a state. names is a one-dimensional cell array that contains the names to be displayed on the nodes which are children of a Run Node. The length of names should be equal to the number of rows in the handles array returned.

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');
        sbioplot(simDataObj);
 

See Also

sbiosubplot

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

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