How to check which function is the slowest one?

조회 수: 8 (최근 30일)
AlonOz
AlonOz 2016년 6월 21일
답변: Shameer Parmar 2016년 6월 21일
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?

답변 (3개)

Stephen23
Stephen23 2016년 6월 21일
편집: Stephen23 2016년 6월 21일

John D'Errico
John D'Errico 2016년 6월 21일
Use the profile tool to identify bottlenecks.
help profile

Shameer Parmar
Shameer Parmar 2016년 6월 21일
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

카테고리

Help CenterFile Exchange에서 Files and Folders에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by