How to calculate the middle point between two points on the Earth in matlab?
Show older comments
Given the latitudes and longitudes of two points, how to get the middle point efficiently?
My trouble is there are millions of point pairs to calculate....
2 Comments
Sad Grad Student
on 9 Jul 2015
could you give an example of your input and the expected output?
James Tursa
on 9 Jul 2015
Edited: James Tursa
on 9 Jul 2015
Middle point on a great circle arc assuming a sphere? Or something else?
How is your data stored?
Accepted Answer
More Answers (1)
Ted Shultz
on 20 Aug 2019
2 votes
There is a built in function in the matlab mapping toolbox that does what I think you are looking for: meanm
Mean location of geographic coordinates
Syntax
[latmean,lonmean] = meanm(lat,lon)
[latmean,lonmean] = meanm(lat,lon,units)
[latmean,lonmean] = meanm(lat,lon,ellipsoid)
Categories
Find more on Geometric Geodesy in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!