Main Content

getstoichmatrix (model)

Get stoichiometry matrix from model object

The order of species in the output arguments (MandobjSpecies) matches the order of species returned bymodelObj.Species.

Syntax

M= getstoichmatrix(modelObj)
[M,objSpecies] = getstoichmatrix(modelObj)
[M,objSpecies,objReactions] = getstoichmatrix(modelObj)

Arguments

M Stoichiometry matrix formodelObj.
modelObj Specify themodel object.
objSpecies

Return the list ofmodelObjspecies byNameproperty of the species.

If the species are in multiple compartments, species names are qualified with the compartment name in the formcompartmentName.speciesName. For example,nucleus.DNA,cytoplasm.mRNA.

objReactions Return the list ofmodelObjreactions by theNameproperty of reactions.

Description

getstoichmatrixreturns a stoichiometry matrix for a model object.

M= getstoichmatrix(modelObj)returns a stoichiometry matrix for a SimBiology®model object (modelObj) toM.

A stoichiometry matrix is defined by listing all reactions contained bymodelObjcolumn-wise and all species contained bymodelObjrow-wise in a matrix. The species of the reaction are represented in the matrix with the stoichiometric value at the location of [row of species, column of reaction]. Reactants have negative values. Products have positive values. All other locations in the matrix are 0.

For example, ifmodelObj是一个模型对象智慧h two reactions with namesR1andR2and Reaction values of2 A + B -> 3 CandB + 3 D -> 4 A, the stoichiometry matrix would be defined as:

R1 R2 A -2 4 B -1 -1 C 3 0 D 0 -3

[M,objSpecies] = getstoichmatrix(modelObj)returns the stoichiometry matrix toMand the species toobjSpecies.objSpeciesis defined by listing allNameproperty values of species contained byObj. In the above example,objSpecieswould be{'A', 'B', 'C', 'D'};.

[M,objSpecies,objReactions] = getstoichmatrix(modelObj)returns the stoichiometry matrix toMand the reactions toobjReactions.objReactionsis defined by listing allNameproperty values of reactions contained bymodelObj. In the above example,objReactionswould be{'R1', 'R2'}.

Examples

  1. Read inm1, a model object, usingsbmlimport:

    m1 = sbmlimport('lotka.xml');
  2. Get the stoichiometry matrix for them1:

    [M,objSpecies,objReactions] = getstoichmatrix(m1)

版本历史

Introduced in R2006a

expand all

Behavior changed in R2019b