MATLAB: Decimal

decimal

Hello, I tried with command round2dp(pi,2) in 2008 Ra matlab it shows the following error:
Undefined function or method 'round2dp' for input arguments of type 'double'.
is it a special function or any other function available to round off to nearest fraction or it can be specified by the user.

Best Answer

This is a user defined function available on the FEX: round2dp.
To use it, you have to download it and then add to MATLAB the path where you unzip it. In MATLAB File > Set path