Timing Comet

9 ビュー (過去 30 日間)
Jack
Jack 2012 年 5 月 4 日
Can you time the time it takes for comet to complete graphing? tic toc times the time it takes for the code to run but I want to time the time it takes to graph the function.
Any help would be appreciated.

採用された回答

Walter Roberson
Walter Roberson 2012 年 5 月 4 日
No. Graphics operations are delegated to graphics drivers which can potentially operate independently of MATLAB (different threads, dedicated graphics cards, graphics might be built into the CPU and might or might not steal cycle time from ordinary operations.) When MATLAB regains control, the graphics is not necessarily completed, or it could be an arbitrary time after the graphics completed (e.g. because the operating system decided to take a coffee break while the disk defragments itself.)

その他の回答 (1 件)

Jan
Jan 2012 年 5 月 4 日
I'm not sure what you are asking for. Perhaps this helps:
tic
...
drawnow
toc
  3 件のコメント
Walter Roberson
Walter Roberson 2012 年 5 月 4 日
How long does it take you to send a letter across the country? 2 minutes to address the envelope, 7 minutes to figure out where you put the stamps, 8 minutes to drive to a post box, 21 seconds to get out of the car and drop the letter in the postbox? And then since the letter is out of your hands and you can do other things, you consider yourself to be finished sending the letter? Or do you also count the time it between when you drop it in the postbox and it eventually ends up in the letter-box of the recipient?
MATLAB requests that graphics be done -- like dropping the letter in the letter box. But MATLAB has no way of knowing when the graphics is actually finished, just like you don't know when the person opened their letter-box and looked inside.
Jack
Jack 2012 年 5 月 4 日
Cool, that makes a lot of sense. Thank You.

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

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by