We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 602a0e9 commit c629c37Copy full SHA for c629c37
+matmap3d/vdist.m
@@ -15,6 +15,9 @@
15
% * lat1 = GEODETIC latitude of first point (degrees)
16
% * lon1 = longitude of first point (degrees)
17
% * lat2, lon2 = second point (degrees)
18
+%
19
+% from https://www.mathworks.com/matlabcentral/fileexchange/8607-vectorized-geodetic-distance-and-azimuth-on-the-wgs84-earth-ellipsoid
20
+
21
function varargout = vdist(lat1,lon1,lat2,lon2)
22
%
23
%%% Original algorithm source:
@@ -66,6 +69,7 @@
66
69
lon2 {mustBeReal,mustBeEqualSize(lat1,lon2)}
67
70
end
68
71
72
+keepsize = size(lat1);
73
% Supply WGS84 earth ellipsoid axis lengths in meters:
74
a = 6378137; % definitionally
75
b = 6356752.31424518; % computed from WGS84 earth flattening coefficient
0 commit comments