MATLAB: Round down lowest number in a decimal number

decimalnumberround

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?

Best Answer

E.g.,
x = whatever
result = floor(x*100)/100;