MATLAB: Simple question regarding “distance” function

MATLABmatlab function

Hi seniors
I've got matlab 2020a in my desktop. When I wanted to use distance, an error occured saying that no such function exists. Before, I was using this fuction in 2018a on another PC and it's working fine. I do find this function in 2020a documents https://uk.mathworks.com/help/map/ref/distance.html, however, the weird thing is when I type help distance in my own PC, it says no such document.
What should I do in order to use this in matlab 2020a?
Thank you in advance.

Best Answer

Type:
ver
in your Command Window to see if the Mapping Toolbox is installed. It should be listed.
If it is not, and you have a license for it, use the Add-On Explorer to download it and install it.
If it is, first run:
restoredefaultpath
rehash toolboxcache
then try again and see if that solves the problem.
If it does not, use the telephone handset icon in the upper right corner of this page to request Technical Support.