MATLAB: Do I receive an error in calling the SURFDIST function in Mapping Toolbox 2.0.2 (R14)

7.07.0.1Mapping ToolboxMATLAB

The documentation lists SURFDIST as a function in Mapping Toolbox 2.0.2 (R14), but when I try to call the function, I receive the following error:
??? Undefined function or variable 'surfdist'.

Best Answer

This change has been incorporated into the documentation in Release 14 Service Pack 3 (R14SP3). For previous releases, read below for any additional information:
The SURFDIST function was moved to a private directory in R14 and restored to a public directory in R14SP3. For some applications, you can use TRACKG in place of SURFDIST.
If you are using Mapping Toolbox 2.0.2 (R14) or Mapping Toolbox 2.0.3 (R14SP1), SURFDIST is still available. In order to access SURFDIST, perform the following steps:
1. Find surfdist.m in the following directory:
$MATLAB\toolbox\map\mapdisp\private
(where $MATLAB is the MATLAB root directory on your machine, as returned by typing
matlabroot
at the MATLAB command prompt.)
2. Move surfdist.m to the following directory:
$MATLAB\toolbox\map\mapdisp
(where $MATLAB is the MATLAB root directory on your machine, as returned by typing
matlabroot
at the MATLAB command prompt.)
3. Restart MATLAB
4. After restarting MATLAB, issue the following command at the MATLAB prompt:
rehash toolboxcache
SURFDIST should now be accessible.