MATLAB: How to round the decimals

decimalsround

I have a number X = 0.135678
Then i just want to round it become 0.14. What to do?
Use round(X) will only give "0".
Thanks before πŸ™‚

Best Answer

A = [pi exp(1) 1/7]
Ndecimals = 2
f = 10.^Ndecimals
A = round(f*A)/f