How to check which function is the slowest one?
10 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
回答(3 个)
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
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!