I have a number like this: 2.32166873546944 I want to take only four numbers after the decimal point and without rounding, that is, I only want: 2.3216 How do I do this in Matlab ?
Prashant Kumar answered .
2025-11-20
format long g x = 2.32166873546944
x =
2.32166873546944
y = floor(x*10000)/10000
y =
2.3216