Round down lowest number in a decimal number

8 visualizaciones (últimos 30 días)
Martin
Martin el 11 de Abr. de 2018
Comentada: Martin el 11 de Abr. de 2018
Hello, say I have a number 4.214513. Then I need to return 4.21. Likewise if I have 4.219999, I need to return 4.21. Is there any function or other method to achieve this in Matlab?

Respuesta aceptada

James Tursa
James Tursa el 11 de Abr. de 2018
E.g.,
x = whatever
result = floor(x*100)/100;

Más respuestas (0)

Categorías

Más información sobre Logical 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