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

5 views (last 30 days)
Hi I just want to keed 2 decimal places without those zeros shown at the picture what do I do please I tried round

Accepted Answer

Jon
Jon on 10 Dec 2020
Edited: Jon on 10 Dec 2020
I think this might do what you want
fprintf('Dog detected at second %0.2f\n',idx(:))
  5 Comments
Rik
Rik on 10 Dec 2020
Ah, yes, I missed that assignment. I thought the variable was not defined in the posted snippet.
Kamil Kacer
Kamil Kacer on 11 Dec 2020
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.

Sign in to comment.

More Answers (0)

Categories

Find more on Matrices and Arrays in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!