ticany statementstoct = toc
tic starts a stopwatch timer.
toc, by itself, prints the elapsed time since tic was used.
t = toc returns the elapsed time in t.
for n = 1:100A = rand(n,n);b = rand(n,1);ticx = A\b;t(n) = toc;endplot(t)
clock,cputime,etime
(c) Copyright 1994 by The MathWorks, Inc.