How to check which function is the slowest one?

10 Ansichten (letzte 30 Tage)
AlonOz
AlonOz am 21 Jun. 2016
Beantwortet: Shameer Parmar am 21 Jun. 2016
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?

Antworten (3)

Stephen23
Stephen23 am 21 Jun. 2016
Bearbeitet: Stephen23 am 21 Jun. 2016

John D'Errico
John D'Errico am 21 Jun. 2016
Use the profile tool to identify bottlenecks.
help profile

Shameer Parmar
Shameer Parmar am 21 Jun. 2016
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

Kategorien

Mehr zu Physics finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by