Round down lowest number in a decimal number

8 vues (au cours des 30 derniers jours)
Martin
Martin le 11 Avr 2018
Commenté : Martin le 11 Avr 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?

Réponse acceptée

James Tursa
James Tursa le 11 Avr 2018
E.g.,
x = whatever
result = floor(x*100)/100;

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by