Home > bioelectromagnetism > NewObject.m

NewObject

PURPOSE ^

Index = NewObject ( objectmap, Name )

SYNOPSIS ^

function objectmap = NewObject ( objectmap, Name )

DESCRIPTION ^

 Index = NewObject ( objectmap, Name )
 Add a new object to the objectmap called Name and return it's index.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function objectmap = NewObject ( objectmap, Name )
0002 % Index = NewObject ( objectmap, Name )
0003 % Add a new object to the objectmap called Name and return it's index.
0004 
0005   Index = length ( objectmap.Objects ) + 1;
0006   if length(Name) > 31
0007     Name = Name(1:31);
0008   end
0009   objectmap.Objects(Index) = DefaultObject ( Name );
0010   objectmap.NumberOfObjects = length ( objectmap.Objects );
0011   return
0012 
0013

Generated on Mon 15-Aug-2005 15:36:19 by m2html © 2003