% Originally written by Simon Burton a=rand(1000,1000); b=rand(1000,1000); N=100; t0 = cputime; for i=1:N c = a+b; end t = cputime-t0; t = t/N N=10; t0 = cputime; for i=1:N c = a*b; end t = cputime-t0; t = t/N a=rand(500,500); N=10; t0 = cputime; for i=1:N c = eig(a); end t = cputime-t0; t = t/N