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 Center および File ExchangeSymbolic Math Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by