Main Content

setspecies (kineticlaw)

Specify species in kinetic law object

Syntax

setspecies(kineticlawObj, 'SpeciesVariablesValue', 'SpeciesVariableNamesValue')

Arguments

SpeciesVariablesValueSpecify the species variable in the kinetic law object.
SpeciesVariableNamesValueSpecify the species name with which to configure the species variable in the kinetic law object. Determines the species in the ReactionRate equation.

Description

setspecies configures the kinetic law object SpeciesVariableNames property.

setspecies(kineticlawObj, 'SpeciesVariablesValue', 'SpeciesVariableNamesValue') configures the SpeciesVariableNames property of the kinetic law object, kineticlawObj. SpeciesVariablesValue corresponds to one of the character vectors in the SpeciesVariables property of kineticlawObj. The corresponding element in kineticlawObj SpeciesVariableNames property is configured to SpeciesVariableNamesValue.

For example, if SpeciesVariables are {'S', 'S1'} and SpeciesVariablesValue is specified as S1, the first element of the SpeciesVariableNames cell array is configured to SpeciesVariableNamesValue.

Examples

Create a model, add a reaction, and assign the SpeciesVariableNames for the reaction rate equation.

  1. Create the model object, and then add a reaction object.

    modelObj = sbiomodel('my_model');
    reactionObj = addreaction(modelObj, 'a -> c + d');
  2. 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.

  3. The 'Henri-Michaelis-Menten' kinetic law has one species variable (S) that should be set. To set this variable:

    setspecies(kineticlawObj,'S', 'a');
  4. Verify that the species variable is correct.

    get (kineticlawObj, 'SpeciesVariableNames')

    MATLAB® returns:

    ans = 
    
    'a'

Version History

Introduced in R2006a