getspecies (kineticlaw)
Get specific species in kinetic law object
Syntax
speciesObj = getspecies(kineticlawObj)
speciesObj = getspecies(kineticlawObj,
SpeciesVariablesValue)
Arguments
| Retrieve species used by the kinetic law object. |
| Retrieve species used by the kinetic law object corresponding to the specified species in the
SpeciesVariables property of the kinetic law object.
Specify a character vector, string scalar, string vector, or cell array of
character vectors. |
Description
returns
the species used by the kinetic law object speciesObj = getspecies(kineticlawObj)kineticlawObj to speciesObj.
returns the species in the speciesObj = getspecies(kineticlawObj,
SpeciesVariablesValue)SpeciesVariableNames property to
speciesObj.
SpeciesVariablesValue is the name of the species as it appears in the
SpeciesVariables property of kineticlawObj.
SpeciesVariablesValue can be a character vector, string scalar,
string vector, or cell array of character vectors.
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.
Examples
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');reactionObjKineticLawproperty is configured tokineticlawObj.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
See Also
Version History
Introduced in R2006a