Hi
I have a script with a large loop nested inside another loop, and i would like to time the progress of the loop, using the tic/toc commands.
The code is like this:
tic
--some code and small loops--
for i=1:lengthi
for j=1:lengthj
clc
disp(['Iteration: ' num2str((i-1)*lengthj+j) ' of ' num2str(lengthi*lengthj)]);
toc
--some code--
end
end
toc
however, when I run the code, toc seems to display the time since last toc, instead of the time since tic. The problem is not exclusive to this piece of code, I have noticed it before with other scripts.
Any thoughts or experience with this?
-Nicolas