How do i round to two decimals without zeros at the end

5 ビュー (過去 30 日間)
Kamil Kacer
Kamil Kacer 2020 年 12 月 10 日
コメント済み: Kamil Kacer 2020 年 12 月 11 日
Hi I just want to keed 2 decimal places without those zeros shown at the picture what do I do please I tried round

採用された回答

Jon
Jon 2020 年 12 月 10 日
編集済み: Jon 2020 年 12 月 10 日
I think this might do what you want
fprintf('Dog detected at second %0.2f\n',idx(:))
  5 件のコメント
Rik
Rik 2020 年 12 月 10 日
Ah, yes, I missed that assignment. I thought the variable was not defined in the posted snippet.
Kamil Kacer
Kamil Kacer 2020 年 12 月 11 日
I agree i should hava assing it to some meaningfull name.
I multiplay all frames by 0.1 so I get seconds
0.1 is a step is in which window gets shiftted every iteration.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by