Get function output and time from timit
2 次查看(过去 30 天)
显示 更早的评论
I have functions I need to time, which returns a single output. All functions are in separate files. How do I get that returned output when using timeit?
So far I have used tic,toc. But want to use timeit from now on.
0 个评论
采纳的回答
Walter Roberson
2018-1-20
You cannot get the actual function output from timeit.
You can look in the File Exchange for the code for timeit and modify that code to suit your needs.
Remember that timeit runs the code a variable number of times.
3 个评论
Walter Roberson
2018-1-20
Read the documentation. It clearly says that timeit runs the code several times and takes the median.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 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!