Dfiference between euclidean and distance function using MAPPING toolbox for latitude and longitude calulation??
7 次查看(过去 30 天)
显示 更早的评论
Can you please a give a simply example where the use of euclidean distance and the use of distance from map leads to a different result?
Please find below my code where A and B, contains [lat,long] in degrees
A=[-0.8147,0.9058]
B=[-0.9575,0.7922]
distances_euclidean = sqrt(sum(bsxfun(@minus, B, A).^2,2));
distance_map=distance(A,B)
Both leads to same value? so please give an example for different lat and long where euclidean and distance from MAP leads to different outcome?
0 个评论
采纳的回答
Walter Roberson
2015-6-25
Your latitudes are very near 0, where longitudes are the maximum distance apart. Add (for example) 70 or 80 degrees to those latitudes and you will get different answers, especially if you also increase the range of longitudes.
更多回答(1 个)
Sean de Wolski
2015-6-25
Pretty much everywhere. One is a measurement on the surface of a sphere or an ellipsoid. The other is the straight distance between the two points.
As a frequent flyer, it sure would be nice to be able to fly the euclidean distance, but that would mean really deep tunnels and no views.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!