Skip to Main Content Skip to Search
Product Documentation

getstoichmatrix (model) - Get stoichiometry matrix from model object

Syntax

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

Arguments

MAdjacency matrix for modelObj.
modelObjSpecify the model object modelObj.
objSpeciesReturn the list of modelObj species by Name property of the species.

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

objReactionsReturn the list of modelObj reactions by the Name property of reactions.

Description

getstoichmatrix returns a stoichiometry matrix for a model object.

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

A stoichiometry matrix is defined by listing all reactions contained by modelObj column-wise and all species contained by modelObj 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.

For example, if modelObj is a model object with two reactions with names R1 and R2 and Reaction values of 2 A + B -> 3 C and B + 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 to M and the species to objSpecies. objSpecies is defined by listing all Name property values of species contained by Obj. In the above example, objSpecies would be {'A', 'B', 'C', 'D'};.

[M,objSpecies,objReactions] = getstoichmatrix(modelObj) returns the stoichiometry matrix to M and the reactions to objReactions. objReactions is defined by listing all Name property values of reactions contained by modelObj. In the above example, objReactions would be {'R1', 'R2'}.

Examples

  1. Read in m1, a model object, using sbmlimport:

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

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

See Also

getadjacencymatrix, Determining the Stoichiometry Matrix for a Model

  


Free Computational Biology Interactive Kit

See how to analyze, visualize, and model biological data and systems using MathWorks products.

Get free kit

Trials Available

Try the latest computational biology products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS