Simple question regarding "distance" function

조회 수: 21 (최근 30일)
QIAO WANG
QIAO WANG 2020년 4월 9일
댓글: QIAO WANG 2020년 4월 14일
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.

채택된 답변

Star Strider
Star Strider 2020년 4월 9일
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.
  댓글 수: 8
Cam Salzberger
Cam Salzberger 2020년 4월 13일
Just remember that not all "distance" functions are created equal. Most of the "distance" functions are actually methods on various objects specific to a toolbox. First you should determine what you want the distance function to do (what is the input and what is the output). Then you can figure out which distance function or functions you can use for it.
QIAO WANG
QIAO WANG 2020년 4월 14일
Thank you Cam. That's a good advice with a useful link. Indeed, not every distance function is useful to me and it looks like only the one in mapping toolbox is helpful since I want to calculate the sphere distance with latitude and logitude as input parameters.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

jessupj
jessupj 2020년 4월 9일
from that link, it looks like the distance function is part of a toolbox.
in my 2019b, distance is available from several toolboxes.
>> help distance
'distance' requires one of the following:
Antenna Toolbox
Automated Driving Toolbox
Communications Toolbox
Computer Vision Toolbox
Mapping Toolbox
Navigation Toolbox
Phased Array System Toolbox
Sensor Fusion and Tracking Toolbox
  댓글 수: 1
QIAO WANG
QIAO WANG 2020년 4월 9일
Thank you for this info.
I didn't realize it belongs to a toolbox. From what you have listed, it's supposed to work with Communications Toolbox which I have in my list but I don't have the Mapping Toolbox.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 LTE Toolbox에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by