| Bioinformatics Toolbox | ![]() |
Find descendants in a biograph object
Nodes = getdescendants(BiographNode)
Nodes = getdescendants(BiographNode, NumGenerations)
BiographNode | Node in a biograph object. |
NumGenerations | Number of generations. Enter a positive integer. |
Nodes = getdescendants(BiographNode) finds a given node (BiographNode) all of its direct descendants.
Nodes = getdescendants(BiographNode, NumGenerations) finds the node (BiographNode) and all of its direct descendants up to a specified number of generations (NumGenerations).
Create a biograph object.
cm = [0 1 1 0 0;1 0 0 1 1;1 0 0 0 0;0 0 0 0 1;1 0 1 0 0]; bg = biograph(cm)
Find one generation of descendants for node 4.
desNodes = getdescendants(bg.nodes(4)); set(desNodes,'Color',[1 .7 .7]); bg.view;

Find two generations of descendants for node 4.
desNodes = getdescendants(bg.nodes(4),2); set(desNodes,'Color',[.7 1 .7]); bg.view;

Bioinformatics Toolbox methods for the biograph object, biograph, dolayout, getancestors, getedgesbynodeid, getnodesbyid, getrelatives, view
MATLAB functions get, set
| getbyname (phytree) | getedgesbynodeid (biograph) | ![]() |
© 1994-2005 The MathWorks, Inc.