tic and toc to calculated the simulation time...but the this not the same everytime...
1 回表示 (過去 30 日間)
古いコメントを表示
I am using a tic and toc command to calculate the simulation time of my matlab program...However, i found out that the time is different for every time...how to solve this or is there any other method that can be use to calculate the simulation time for matlab program?
0 件のコメント
回答 (1 件)
Daniel Shub
2012 年 5 月 19 日
The running time of your program is going to be slightly different every time because the OS does slightly different things while your program is running (it might check for viruses, download updates, refresh the screen, etc.). This means TIC/TOC should return different values.
2 件のコメント
John D'Errico
2012 年 5 月 19 日
Yes. Going off to use your web browser in the middle of a test can be a killer too. You can improve things by downloading timeit from the file exchange though. You will ALWAYS see some variability in the computed time.
参考
カテゴリ
Help Center および File Exchange で Downloads についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!