How can I round a decimal number like 26,548746540516
to 26,5487
in MATLAB?
You can use round
as follows
round(x*10000) / 10000.0
Alternatively, you can use round2
round2(x,0.0001)
round2(x,1e-4)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With