Is matlab function distance is broken ?

조회 수: 4 (최근 30일)
Aymeric Ferreira
Aymeric Ferreira 2020년 6월 2일
댓글: Ameer Hamza 2020년 6월 3일
Hello,
I try to calculate the distance between two points on a sphere. It seems that the function distance is built-in https://www.mathworks.com/help/map/ref/distance.html
But I'm unable to make it work, even the examples in the doc seem to not work :
arclen = distance('gc',[37,-76],[37,-9])
arclen = distance('rh',[37,-76],[37,-9])
I always have this error :
Check for missing argument or incorrect argument data type in call to function 'distance'.
I even tried syntax like that :
[arclen,az] = distance('gc',[37,-76],[37,-9])
But nothing seems to work, why ? I'm using Matlab R2020a, is it deprecated ?
  댓글 수: 5
Aymeric Ferreira
Aymeric Ferreira 2020년 6월 3일
Thank you, I didn't see it.
How I can accept your answer ?
Ameer Hamza
Ameer Hamza 2020년 6월 3일
Aymeric, I added it as an answer. You can accept it.

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

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 6월 3일
You need mapping toolbox to use this function: https://www.mathworks.com/products/mapping.html

추가 답변 (1개)

Mark Brandon
Mark Brandon 2020년 6월 2일
It's your install.
Screen grab from those commands on my 2020a Update 2
un-install and clean install again?
good luck. MB

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by