I'm checking the running time of a function using tic/toc. I write the following in the command window (and execute it simultaneously):
ticres = checkFunc('case2736sp',1:3000);tocElapsed time is 0.080491 seconds.
where checkFunc returns a 2736×2500 full matrix.
What puzzles me is that I have to wait almost 20 seconds for the output saying the run time is only 80 ms.
Does anyone have a clue why this is?
Best Answer