MATLAB: Difference between MATLAB tic-toc time and actual time measured with a stop watch

tictoc

Hello, this may seem stupid but I tried to check the time measured by tic-toc and the actual time measured with the help of stop watch for a certain program. I was surprised that tic-toc displayed about 4 minutes and my real world stop watch showed about 11 minutes. Can someone explain this mystery to me?

Best Answer

You could also try "profview" if you want to see what's taking the time in your function. You'll get loads of detailed information and even hints on how to speed stuff up.
Related Question