Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to use MATLAB Profiler

📅 2016-Feb-11 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ matlab, profiler ⬩ 📚 Archive

MATLAB has a built-in profiler that is very useful to profile your code and find out what script or function is taking the most time.

From GUI

To run a script in the profiler, open the script file and click Run and Time in the top menu. After running the script, the profiler gives a hyperlinked colorful graph of functions and the times they took.

From Command Window

The equivalent of the above operation in commands is:

profile on; run_my_script; profile off; profile viewer

Reference: profile

Tried with: MATLAB R2014a and Ubuntu 14.04

© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘📧