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

10 visualizaciones (últimos 30 días)
Kamil Kacer
Kamil Kacer el 10 de Dic. de 2020
Comentada: Kamil Kacer el 11 de Dic. de 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

Respuesta aceptada

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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Matrices and Arrays en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by