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

10 vues (au cours des 30 derniers jours)
Kamil Kacer
Kamil Kacer le 10 Déc 2020
Commenté : Kamil Kacer le 11 Déc 2020
Hi I just want to keed 2 decimal places without those zeros shown at the picture what do I do please I tried round

Réponse acceptée

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

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Matrices and Arrays dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by