>> help tic TIC Start a stopwatch timer. The sequence of commands TIC, operation, TOC prints the time required for the operation. See also TOC, CLOCK, ETIME, CPUTIME. >> help toc TOC Read the stopwatch timer. TOC, by itself, prints the elapsed time since TIC was used. t = TOC; saves the elapsed time in t, instead of printing it out. See also TIC, ETIME, CLOCK, CPUTIME. >> help etime ETIME Elapsed time. ETIME(T1,T0) returns the time in seconds that has elapsed between vectors T1 and T0. The two vectors must be six elements long, in the format returned by CLOCK: T = [Year Month Day Hour Minute Second] Here's an example of using ETIME to time an operation: t0 = clock; operation etime(clock,t0) Caution: As currently implemented, it won't work across month or year boundaries. It is an M-file, so it can be fixed if you require this. See also TIC, TOC, CLOCK, CPUTIME. >> help cputime CPUTIME CPU time in seconds. CPUTIME returns the CPU time in seconds that has been used by the MATLAB process since MATLAB started. For example: t=cputime; your_operation; cputime-t returns the cpu time used to run your_operation. The return value may overflow the internal representation and wrap around. See also ETIME, TIC, TOC, CLOCK >> diary off