Is matlab function distance is broken ?
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
更多回答(1 个)
Mark Brandon
2020-6-2
It's your install.
Screen grab from those commands on my 2020a Update 2
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/308143/image.jpeg)
un-install and clean install again?
good luck. MB
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!