clock should return whole numbers.
2 ビュー (過去 30 日間)
古いコメントを表示
clock command results in:
clock
ans =
1.0e+003 *
2.0120 0.0080 0.0260 0.0160 0.0590 0.0028
but i want answer in the form
[2012 8 26 16 59 2.848]
0 件のコメント
採用された回答
Walter Roberson
2012 年 8 月 26 日
See the command "format", such as
format long g
1 件のコメント
Jan
2012 年 8 月 27 日
Explicitly: FORMAT does not change the clock format and there is not reason to change it. But the method to display a vector in the command window is affected by FORMAT. Another method, which is independent from the FORMAT setting:
fprintf('%.4g ', clock)
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Clocks and Timers についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!