Round down lowest number in a decimal number

7 次查看(过去 30 天)
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?

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by