function index = timeplt_obj_index() % TIMEPLT_OBJ_INDEX: Determines cell index of current timeplt object. % % Not to be called from command line. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Use of this program is self described. % Program written in Matlab v7.1.0 SP3 % Program ran on PC with Windows XP Professional OS. % % "Although this program has been used by the USGS, no warranty, % expressed or implied, is made by the USGS or the United States % Government as to the accuracy and functioning of the program % and related program material nor shall the fact of distribution % constitute any such warranty, and no responsibility is assumed % by the USGS in connection therewith." %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % If a callback was invoked, use gcbf to get the index. % Otherwise use gcf. %%%%%%%% Added by jpx for accomadating CMG TOOL % if ( ~isempty(gcbf) ) % current_figure = gcbf; % x='first' % else % current_figure = gcf; % x='second' % end % % figure_tag = get ( current_figure, 'tag' ); %%%%%%%%%%%%%%%%%% jpx, 11/24/98 %%%%%%%%%%%%%% figure_tag=get(gcf,'tag'); % % The index is dependent upon the figure tag being of the % form 'timeplt figure %d'. [dud,rest] = strtok(figure_tag); [dud,rest] = strtok(rest); [index,rest] = strtok(rest); index = str2num(index); return;