matlab遍历所有节点最短路径,求助:已知所有点的坐标,求经过所有点的最短路径...

这篇博客分享了一个MATLAB函数`geodistance`,用于计算地球上两点之间的最短距离,支持多种地球椭球模型。函数采用Vincenty's公式和其他方法,适用于不同精度需求的地理距离计算。
摘要由CSDN通过智能技术生成

zjw123asd 发表于 2012-4-20 20:30 bbd016eb636182ff59f287f6e5567aa8.gif

题目就是如上所示

function r = geodistance( ci , cf , m )

%GEODISTANCE: Calculates the distance in meters between two points on earth surface.

%

% Usage:  r = geodistance( coordinates1 , coordinates2 , method ) ;

%

%          Where coordinates1 = [lambda1,phi1] defines the

%          initial position and coordinates2 = [lambda2,phi2]

%          defines the final position.

%          Coordinates values should be specified in decimal degrees.

%          Method can be an integer between 1 and 23, default is m = 6.

%         Methods 1 and 2 are based on spherical trigonometry and a

%         spheroidal model for the earth, respectively.

%          Methods 3 to 24 use Vincenty's formulae, based on ellipsoid

%         parameters.

%         Here it follows the correspondence between m and the type of

%         ellipsoid:

%

%         m =  3 -> ANS ,        m =  4 -> GRS80,    m = 5 -> WGS72,

%         m =  6 -> WGS84,       m =  7 -> NSWC-9Z2,

%         m =  8 -> Clarke 1866, m =  9 -> Clarke 1880,

%         m = 10 -> Airy 1830,

%         m = 11 -> Bessel 1841 (Ethiopia,Indonesia,Japan,Korea),

%         m = 12 -> Bessel 1841 (Namibia),

%         m =

  • 3
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值