Distance between two points of latitude/longitude
12 views (last 30 days)
Show older comments
I need to work out the distance (km) between two points.
The first latitude and longitude is 55 27.58'N 005 01.92'W and the second was taken at 49 58.25'N 008 08.13'W
I did try the latlon1 latlon2 function but I'm not sure if it's giving me the correct distance?
Any advice!
1 Comment
dpb
on 4 Jan 2021
What makes you think it isn't the correct result? Have you checked you reproduce the answer for the sample case in the help for the function?
There's also another implementation of Haversine forumula on FEX I've used that seems to work reliably <Haversince FEX submission>; you can always check against its result for consistency.
And, of course, use coordinates for known locations and for which you know the correct answer to verify.
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!