How do you return computational time and memory allocated during function call?
1 回表示 (過去 30 日間)
古いコメントを表示
I am trying to save the computational time and memory allocated during a function call to two variables (that can then be saved to a text file). How do I return both, as well as the normal output of my function, when calling my function?
0 件のコメント
回答 (1 件)
Star Strider
2025 年 2 月 28 日
There are a few functions you can use for timing, one of which is the tic, toc pair. Most current recommendations are to use duration arrays for this, although in the past, using clock and etime were appropriate.
There may be File Exchange contributions that could do what you want, so search there as well.
.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Performance and Memory についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!