MATLAB Function Reference |
Measure performance using stopwatch timer
Syntax
Description
toc
prints the elapsed time since tic
was used.
t = toc
returns the elapsed time in t
.
Remarks
The tic
and toc
functions work together to measure elapsed time. tic
saves the current time that toc
uses later to measure the elapsed time. The sequence of commands
measures the amount of time MATLAB takes to complete one or more operations
, and displays the time in seconds.
Examples
This example measures how the time required to solve a linear system varies with the order of a matrix.
See Also
clock
, cputime
, etime
, profile
textwrap | timer |
© 1994-2005 The MathWorks, Inc.