📄 m_xydist.m
字号:
function dist = m_xydist(x,y)% M_XYDIST Spherical earth distance between points in map projection coordinates. % RANGE=M_XYDIST(X,Y) gives the distance in kilometers between% successive points in the vectors X and Y which are coordinates% in the current map projection. This function is useful for finding% distances between points "picked off" a map, e.g.:%% Example:% G = GINPUT(2); km_dist = M_XYDIST(G(:,1),G(:,2));%% See also M_LLDIST% Rich Pawlowicz (rich@ocgy.ubc.ca) 6/Nov/00, based largely on an% idea by Deirdre Byrne.% This software is provided "as is" without warranty of any kind. But% it's mine, so you can't sell it.global MAP_PROJECTION MAP_VAR_LISTif isempty(MAP_PROJECTION), disp('No Map Projection initialized - call M_PROJ first!'); return;end;% get lon, lat coords[lon,lat] = m_xy2ll(x,y);dist = m_lldist(lon,lat);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -