| Bioinformatics Toolbox™ | ![]() |
[Matrix, ID, Distances]
= getmatrix(BGObj)
| BGObj | Biograph object created by biograph (object constructor). |
[Matrix, ID, Distances] = getmatrix(BGObj) converts the biograph object, BiographObj, into a logical sparse matrix, Matrix, in which 1 indicates that a node (row index) is connected to another node (column index). ID is a cell array of strings listing the ID properties for each node, and corresponds to the rows and columns of Matrix. Distances is a column vector with one entry for every nonzero entry in Matrix traversed column-wise and representing the respective Weight property for each edge.
cm = [0 1 1 0 0;2 0 0 4 4;4 0 0 0 0;0 0 0 0 2;4 0 5 0 0]; bg = biograph(cm); [cm, IDs, dist] = getmatrix(bg)
Bioinformatics Toolbox™ function: biograph (object constructor)
Bioinformatics Toolbox object: biograph object
Bioinformatics Toolbox methods of a biograph object: dolayout, getancestors, getdescendants, getedgesbynodeid, getnodesbyid, getrelatives, view
![]() | getedgesbynodeid (biograph) | getmatrix (geneont) | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |