I'm trying to write code in MATLAB that will round number to certain (as I ask) significant digits.
I'm not sure how to do it. Any suggestions?
I'm trying to write code in MATLAB that will round number to certain (as I ask) significant digits.
I'm not sure how to do it. Any suggestions?
To round to
dsignificant digits:To round to
ddecimal digits:EDIT
Actually it's easier: the
roundfunction supports these options: