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

5 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by