Specify frequency to log stochastic simulation output
LogDecimation
is a property of the SolverOptions
property,
which is a property of a configset
object. This
property defines how often stochastic simulation data is recorded. LogDecimation
is
available only for stochastic solvers (ssa
, expltau
,
and impltau
).
Use LogDecimation
to specify how frequently
you want to record the output of the simulation. For example, if you
set LogDecimation
to 1
, for
the command [t,x] = sbiosimulate(modelObj)
, at
each simulation step the time will be logged in t
and
the quantity of each logged species will be logged as a row in x
.
If LogDecimation
is 10
, then
every 10th simulation step will be logged in t
and x
.
Applies to | Object: SolverOptions |
Data type | int |
Data values | >0. Default is 1 . |
Access | Read/write |
This example shows how to change LogDecimation
settings.
Retrieve the configset
object from
the modelObj
, and change the SolverType
to expltau
.
modelObj = sbiomodel('cell'); configsetObj = getconfigset(modelObj); set(configsetObj, 'SolverType', 'expltau')
Change the LogDecimation
to 10
.
set(configsetObj.SolverOptions, 'LogDecimation', 10); get(configsetObj.SolverOptions, 'LogDecimation') ans = 10