MATLAB: Run time of a code

MATLAB

How can i find out run time of a code written in matlab.

Best Answer

You can use:
tic
...your code
toc
and you'll obtain something like:
Elapsed time is 0.04 seconds.