need help on calculating complexity ,speed and time needed by given code

2 ビュー (過去 30 日間)
rjnt Kaur
rjnt Kaur 2013 年 4 月 12 日
Hello professionals...i need help on how to calculate the comlexity,speed and time spent on calculation of matlab code.can u plz suggest me proper method regarding this.Thanking you

回答 (1 件)

Walter Roberson
Walter Roberson 2013 年 4 月 12 日
編集済み: Walter Roberson 2013 年 4 月 12 日
There is no tool to measure complexity; you need to calculate it using formal analysis.
Time spent can be measured with tic and toc. Be warned, though, that they measure elapsed time, not CPU time. You would need to use your operating system facilities to measure cpu time. For higher precision time measurement, consider using the FEX contribution "timeit". The technical differences between "elapsed time" and CPU time can be considerable.
You cannot calculate "speed" or "performance" without some detailed operating system and hardware tools that are specific to the hardware you are using.
On modern CPUs, measuring performance of a section of code can be quite difficult and requires making a whole series of decisions about what "performance" means.
  1 件のコメント
rjnt Kaur
rjnt Kaur 2013 年 4 月 12 日
I heard about profiler in matlab ans used it but not able to properly worked on calculating such performance...can i use the time devoted given in profiler and how i will calculate it correctly for my matlab code

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by