| SimBiology® | ![]() |
[t,x,names] = sbiosimulate(modelObj)
simDataObj = sbiosimulate(modelObj)
... = sbiosimulate(modelObj, configsetObj)
... = sbiosimulate(modelObj, variantObj)
... = sbiosimulate(modelObj, configsetObj, variantObj)
| t | An n-by-1 vector of time points. Shows the simulation time steps. |
| x | An n-by-m data array. Where n is the number of time samples and m is the number of states logged in the simulation. Each column of x describes the variation in the quantity of a state over time. |
| names | An m-by-1 cell array of names. If the species are in multiple compartments, species names are qualified with the compartment name, in the form, compartmentName.speciesName. For example, nucleus.DNA, cytoplasm.mRNA. Parameter names are qualified with the reaction name if the parameter is scoped to the reaction's kinetic law, for example, Transcription.k1, denotes that the parameter k1 is scoped to the kinetic law for the reaction, Transcription. |
| simdataObj | simdataObj is an object that holds time and state data as well as metadata, such as the types and names for the logged states or the configuration set used during simulation. You can access time, data, and names stored in simdataObj through simdataObj properties. See SimData object for more information. |
| modelObj | Model object to be simulated. |
| configsetObj | Specify the configuration set object to use in the simulation. For more information about configuration sets see Configset object. |
| variantObj | Specify the variant object to apply to the model during the simulation. For more information about variant objects see Variant object. |
[t,x,names] = sbiosimulate(modelObj) simulates a model object (modelObj) using the active configuration set attached to the model (modelObj) and returns the specified outputs as described in Output Arguments.
simDataObj = sbiosimulate(modelObj) simulates the Simbiology model object (modelObj) and returns the results to a SimData object.
... = sbiosimulate(modelObj, configsetObj) simulates a model object (modelObj) using a configuration set (configset) that overrides the active configuration set attached to the model (modelObj). After the command is executed this override does not exist; the configuration set that is defined as 'active' is reinstated. To get the configuration sets attached to a model, use getconfigset. To attach a new or existing configuration set to a model, use addconfigset. To set the active configuration set of a model, use setactiveconfigset. For more information about configuration sets see Configset object.
... = sbiosimulate(modelObj, variantObj) simulates a model object, (modelObj), using the variant object or array of variant objects (variantObj).
... = sbiosimulate(modelObj, configsetObj, variantObj) simulates a model object, (modelObj), using the configuration set object configsetObj and the variant object or array of variant objects (variantObj).
Configuration set property summary
| Active | Indicate object in use during simulation |
| CompileOptions | Dimensional analysis and unit conversion options |
| Name | Specify name of object |
| Notes | HTML text describing SimBiology® object |
| RuntimeOptions | Options for logged species |
| SensitivityAnalysisOptions | Specify sensitivity analysis options |
| SolverOptions | Specify model solver options |
| SolverType | Select solver type for simulation |
| StopTime | Set stop time for simulation |
| StopTimeType | Specify type of stop time for simulation |
| TimeUnits | Show stop time units for simulation |
| Type | Display top-level SimBiology® object type |
The following examples show you how to change solver settings.
Create a SimBiology® model from an SBML file, simulate the model using a solver other than the default solver (default is ode15s), and view the results.
Read the file for theoscillator model.
modelObj = sbmlimport('oscillator.xml');Get the active configset.
configsetObj = getconfigset(modelObj, 'active');
Configure the SolverType to ode45 and set StopTime to 10.
set(configsetObj, 'SolverType', 'ode23s'); set(configsetObj, 'StopTime', 10);
Simulate modelObj.
[t,x]= sbiosimulate(modelObj);
Plot the results of the simulation.
plot(t, x)
Simulate the above example with DimensionalAnalysis off (set to false).
Repeat steps 1 and 2 above, then set dimensional analysis and unit conversion off in the configset object. DimensionalAnalysis and UnitConversion are properties of the CompileOptions object in the configset object.
set(configsetObj.CompileOptions, 'UnitConversion', false); set(configsetObj.CompileOptions, 'DimensionalAnalysis', false);
Simulate modelObj.
simDataObj = sbiosimulate(modelObj);
Plot the results of the simulation.
plot(simDataObj.Time, simDataObj.Data); legend(simDataObj.DataNames)
SimBiology object constructor sbiomodel, model object method addconfigset
![]() | sbioshowunits | sbiospecies | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |