| Contents | Index |
speciesObj = getspecies(kineticlawObj)
speciesObj = getspecies(kineticlawObj,
'SpeciesVariablesValue')
| kineticlawObj | Retrieve species used by the kinetic law object. |
| SpeciesVariablesValue | Retrieve species used by the kinetic law object corresponding to the specified species in the SpeciesVariables property of the kinetic law object. |
speciesObj = getspecies(kineticlawObj) returns the species used by the kinetic law object kineticlawObj to speciesObj.
speciesObj = getspecies(kineticlawObj, 'SpeciesVariablesValue') returns the species in the SpeciesVariableNames property to speciesObj.
SpeciesVariablesValue is the name of the species as it appears in the SpeciesVariables property of kineticlawObj. SpeciesVariablesValue can be a cell array of strings.
Species names are referenced by reaction objects, kinetic law objects, and model objects. If you change the name of a species, the reaction updates to use the new name. You must, however, configure all other applicable elements such as rules that use the species, and the kinetic law object SpeciesVariableNames. Use the method setspecies to configure SpeciesVariableNames.
Create a model, add a reaction, and then assign the SpeciesVariableNames for the reaction rate equation.
Create a model object, and then add a reaction object.
modelObj = sbiomodel('my_model'); reactionObj = addreaction(modelObj, 'a -> c + d');
Create a kinetic law object for the reaction object, of the type 'Henri-Michaelis-Menten'.
kineticlawObj = addkineticlaw(reactionObj, 'Henri-Michaelis-Menten');reactionObj KineticLaw property is configured to kineticlawObj.
The 'Henri-Michaelis-Menten' kinetic law has one species variable (S) that should to be set. To set this variable:
setspecies(kineticlawObj,'S', 'a');
Retrieve the species variable using getspecies.
speciesObj = getspecies (kineticlawObj, 'S')MATLAB returns:
SimBiology Species Array Index: Compartment: Name: InitialAmount: InitialAmountUnits: 1 unnamed a 0
addspecies, getparameters, setparameter, setspecies

See how to analyze, visualize, and model biological data and systems using MathWorks products.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |