posdist
Version 1.0.0.0 (1.99 KB) by
Jakob Tougaard
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.
Cite As
Jakob Tougaard (2026). posdist (https://se.mathworks.com/matlabcentral/fileexchange/35562-posdist), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2010a
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
- Mathematics and Optimization > Mapping Toolbox > Coordinate Reference Systems >
- Radar > Mapping Toolbox > Coordinate Reference Systems >
Find more on Coordinate Reference Systems in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
