Example: function tic % TIC Start a
stopwatch timer. %
TIC; any stuff; TOC % prints the
time required. % See also:
TOC, CLOCK. global TICTOC TICTOC = clock;
function t =
toc % TOC Read the
stopwatch timer. % TOC prints
the elapsed time since TIC was used. % t = TOC;
saves elapsed time in t, does not print. % See also:
TIC, ETIME. global TICTOC if nargout < 1 elapsed_time =
etime(clock, TICTOC) else t =
etime(clock, TICTOC); end
Tips_Global_Variables.src last modified Oct 17, 2007