How to check which function is the slowest one?

I'm trying to figure out which function in my program (designed to solve non-linear equations) is the 'bottle-neck' of the calculation. Any useful suggestions?

Answers (3)

Use the profile tool to identify bottlenecks.
help profile
Simply put..
'tic' and 'toc' commands in each function one by one and check the time..
% starting of function
tic
% your code
% your code
% your code
toc
% end of this function

Categories

Find more on Files and Folders in Help Center and File Exchange

Tags

Asked:

on 21 Jun 2016

Answered:

on 21 Jun 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!