Distance between two points of latitude/longitude

조회 수: 9 (최근 30일)
emily bristow
emily bristow 2021년 1월 4일
댓글: dpb 2021년 1월 4일
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
dpb 2021년 1월 4일
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.

댓글을 달려면 로그인하십시오.

답변 (0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by