identify cpu hogging matlab code
February 18th, 2006 by Lawrence David
often, you’ll write code in matlab that will take forever to run. if you’re lucky, it’s simply because you’ve written inefficient code. to try and identify locations where you can speed up matlab running time, use the profile tool.
try this:
>>profile on
>>your_script_here
>>profile viewer
an applet should appear which allows you to drill down on which specific regions of code consumed the most computing resources.