getstoichmatrix (model)
Get stoichiometry matrix from model object
The order of species in the output arguments (M
andobjSpecies
) 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 for . |
|
Specify themodel object . |
|
Return the list of If the species are in multiple compartments, species names are qualified with the compartment name in the form |
|
Return the list of reactions by theName property of reactions. |
Description
getstoichmatrix
returns a stoichiometry matrix for a model object.
returns a stoichiometry matrix for a SimBiology®model object (M
= getstoichmatrix(modelObj
)
) tomodelObj
.M
A stoichiometry matrix is defined by listing all reactions contained by
column-wise and all species contained bymodelObj
row-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.modelObj
For example, if
是一个模型对象智慧h two reactions with namesmodelObj
R1
andR2
and Reaction values of2 A + B -> 3 C
andB + 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
[
returns the stoichiometry matrix toM
,objSpecies
] = getstoichmatrix(modelObj
)
and the species toM
.objSpecies
is defined by listing allobjSpecies
Name
property values of species contained by
. In the above example,Obj
would beobjSpecies
{'A', 'B', 'C', 'D'}
;.
[
returns the stoichiometry matrix toM
,objSpecies
,objReactions
] = getstoichmatrix(modelObj
)
and the reactions toM
.objReactions
is defined by listing allobjReactions
Name
property values of reactions contained by
. In the above example,modelObj
would beobjReactions
{'R1', 'R2'}
.
Examples
Read in
m1
, a model object, usingsbmlimport
:m1 = sbmlimport('lotka.xml');
Get the stoichiometry matrix for the
m1
:[M,objSpecies,objReactions] = getstoichmatrix(m1)