posdist

Calculates distance between two geographical positions in lat/long format

您现在正在关注此提交

Calculates distance in km between two points given in decimal degrees latitude and longitude. Calculation can be great circle distance (smallest distance along the surface of a sphere) or Cartesian distance (planar approximation for smaller distances).
Input can be as scalars or arrays, as long as dimensions are identical for all four coordinates.

The function is based on the pos2dist function submitted by Langqui Sun, modified to allow arrays as input.

引用格式

Jakob Tougaard (2026). posdist (https://ww2.mathworks.cn/matlabcentral/fileexchange/35562-posdist), MATLAB Central File Exchange. 检索时间: .

致谢

参考作品: pos2dist

启发作品: pathdist

一般信息

MATLAB 版本兼容性

  • 兼容任何版本

平台兼容性

  • Windows
  • macOS
  • Linux
版本 已发布 发行说明 Action
1.0.0.0