Speed of a MATLAB code
显示 更早的评论
Hello
How to calculate the speed of execution of a MATLAB Code?
采纳的回答
更多回答(1 个)
Iain
2013-5-28
2 个投票
You can measure the time taken to execute a chunk of code using "now", or tic and toc,
tic;
codegoeshere;
toc % prints the time taken to screen.
logtime(1) = now;
code_segment
logtime(2) = now;
code_segment
...
logtime(n) = now;
类别
在 帮助中心 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!