Home > brede > brede_mat_descendants.m

brede_mat_descendants

PURPOSE ^

brede_mat_descendants - Find descendants

SYNOPSIS ^

function O = brede_mat_descendants(M, varargin)

DESCRIPTION ^

 brede_mat_descendants - Find descendants 

       O = brede_mat_descendants(M, 'PropertyName', 'PropertyValue') 
 
       Input:    M     'Mat' structure
     
       Property: Node  [ {1} | index ] Node index to begin from  

       Output:   O     Index

       Find descendants of a node. The matrix in the input 'mat'
       structure is regarded as an adjacency matrix (a graph matrix) 
       with parents in the rows and children in the columns. The
       children and children's children and so on are returned.

       Example: 
         fext =  fullfile(fileparts(which('brede')), 'xml', 'woexts.xml');
         T = brede_read_xml(fext, 'output', 'collapsesecond');
         M = brede_ext_ext2mat(T);
         i = brede_mat_descendants(M, 'node', 3)
         M.rows{i(1)}
 
       See also BREDE, BREDE_MAT.

 $Id: brede_mat_descendants.m,v 1.3 2005/02/21 14:21:45 fnielsen Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 27-Nov-2009 18:11:22 by m2html © 2005