Measure time required to run function
t = timeit(
measures
the typical time (in seconds) required to run the function specified
by the function handle f
)f
.
t = timeit(
calls f
,numOutputs
)f
with
the desired number of outputs, numOutputs
. By default, timeit
calls
the function f
with one output (or no outputs,
if the function does not return any outputs).
The following actions result in unexpected output:
timeit
between tic
and toc
timeit
to time a function
that includes calls to tic
and toc
timeit
recursively
timeit
calls the specified function multiple
times, and computes the median of the measurements.