Products & Services Solutions Academia Support User Community Company

Learn more about SimBiology   

getadjacencymatrix (model) - Get adjacency matrix from model object

Syntax

M = getadjacencymatrix(modelObj)
[M, Headings] = getadjacencymatrix(modelObj)
[M, Headings, Mask] = getadjacencymatrix(modelObj)

Arguments

MAdjacency matrix for modelObj.
modelObjSpecify the model object.
HeadingsReturn row and column headings.

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

MaskReturn 1 for the species object and 0 for the reaction object to Mask.

Description

getadjacencymatrix returns the adjacency matrix for a model object.

M = getadjacencymatrix(modelObj) returns an adjacency matrix for the model object (modelOBJ) to M.

An adjacency matrix is defined by listing all species contained by modelObj and all reactions contained by modelObj column-wise and row-wise in a matrix. The reactants of the reactions are represented in the matrix with a 1 at the location of [row of species, column of reaction]. The products of the reactions are represented in the matrix with a 1 at the location of [row of reaction, column of species]. All other locations in the matrix are 0.

[M, Headings] = getadjacencymatrix(modelObj) returns the adjacency matrix to M and the row and column headings to Headings. Headings is defined by listing all Name property values of species contained by modelObj and all Name property values of reactions contained by modelObj.

[M, Headings, Mask] = getadjacencymatrix(modelObj) returns an array of 1s and 0s to Mask, where a 1 represents a species object and a 0 represents a reaction object.

Examples

  1. Read in a model using sbmlimport.

    modelObj = sbmlimport('lotka.xml');
  2. Get the adjacency matrix for the modelObj.

       [M, Headings] = getadjacencymatrix(modelObj)

See Also

getstoichmatrix

  


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-2010- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS