MATLAB: About roundn() function in matlab 2013a

roundn function

In my code, I can run the roundn() function in matlab 2010b. However, when these codes are run in the matlab 2013a versio, roundn() function is failed. And it shows that this is undefined function. I have to replace roundn by vpa function.

Best Answer

roundn() is part of the Mapping Toolbox. You probably do not have that toolbox installed or licensed in your 2013a version.
There is also a roundn() File Exchange contribution; it is possible that at some point you had installed that.
Note: as of R2014b, the round() function of MATLAB was enhanced to support rounding to a particular number of digits.