Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

getnodesbyid (biograph)

Get handles to nodes

Syntax

NodesHandles = getnodesbyid(BGobj,NodeIDs)

Arguments

BGobj

Biograph object.

NodeIDs

Enter a character vector or cell array of character vectors containing node identifications.

Description

NodesHandles = getnodesbyid(BGobj,NodeIDs) gets the handles for the specified nodes (NodeIDs) in a biograph object.

Examples

  1. Create a biograph object.

    species = {'Homosapiens','Pan','Gorilla','Pongo','Baboon',...
               'Macaca','Gibbon'};
    cm = magic(7)>25 & 1-eye(7);
    bg = biograph(cm, species)
    
  2. Find the handles to members of the Cercopithecidae family and members of the Hominidae family.

    Cercopithecidae = {'Macaca','Baboon'};
    Hominidae = {'Homosapiens','Pan','Gorilla','Pongo'};
    CercopithecidaeNodes = getnodesbyid(bg,Cercopithecidae);
    HominidaeNodes = getnodesbyid(bg,Hominidae);
  3. Color the families differently and draw a graph.

More About

Introduced before R2006a

Was this topic helpful?