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

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

Risposta accettata

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

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Matrices and Arrays in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by