How to record excution time of a subfunction during runtime?

1 次查看(过去 30 天)
I have a function, that repeatedly calls a specific subfunction and I need to record the execution time of every call. How can I do that with profile? The help page for profile didn't go into how the time is recorded, if it is.
Can I just time the call from the outside or do I have to change the subfunction to record it's own runtime and return with all the other values?

采纳的回答

Mischa Kim
Mischa Kim 2014-3-31
编辑:Mischa Kim 2014-3-31
Daniel, use tic and toc.
tic
[your subroutine call or commands]
toc

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Workspace Variables and MAT-Files 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by