MATLAB: Difference Elapsed time program between two matlab versions ?!!

time elapsed matlab 2017a matlab 2007b

Why the same program
in MATLAB 2017a : Elapsed time is 0.066801 seconds.
and
in MATLAB 2007b : Elapsed time is 0.005830 seconds.
There is a big difference !

Best Answer

Sure, I am growing older, I am running slower, :).
Seriously, if that is all the time it takes to run your program in the two versions of MATLAB, I would say "forget it".
If it is just a small snip of your code and you need to run it thousands of times, then you can run "profile" to find it out. see "help profile".
Or you can contact Mathworks' tech support for help. They would be very interested in any use case that shows the opposite trend of their optimization.
Related Question