MATLAB: How to know how much time it takes to run the matlab code

time

Dear sir/madam,
I need to know, how much time does a code take to run and display the output? how can I calculate this in matlab? Looking forward to hearing from you soon.
Thanking you, BSD

Best Answer

tic;
% do stuff
toc;
Also, see cputime(), etime(), clock()
Related Question