Home > timeplt5 > timeplt_obj_index.m

timeplt_obj_index

PURPOSE ^

TIMEPLT_OBJ_INDEX: Determines cell index of current timeplt object.

SYNOPSIS ^

function index = timeplt_obj_index()

DESCRIPTION ^

 TIMEPLT_OBJ_INDEX:  Determines cell index of current timeplt object.

 Not to be called from command line.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function index = timeplt_obj_index()
0002 % TIMEPLT_OBJ_INDEX:  Determines cell index of current timeplt object.
0003 %
0004 % Not to be called from command line.
0005 
0006 
0007 %
0008 % If a callback was invoked, use gcbf to get the index.
0009 % Otherwise use gcf.
0010 if ( ~isempty(gcbf) )
0011     current_figure = gcbf;
0012 else
0013     current_figure = gcf;
0014 end
0015 
0016 figure_tag = get ( current_figure, 'tag' );
0017 
0018 %
0019 % The index is dependent upon the figure tag being of the
0020 % form 'timeplt figure %d'.
0021 [dud,rest] = strtok(figure_tag);
0022 [dud,rest] = strtok(rest);
0023 [index,rest] = strtok(rest);
0024 index = str2num(index);
0025 
0026 return;

Generated on Wed 30-Nov-2005 15:41:45 by m2html © 2003