www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/SurfaceDistanceExample.m

    %% Surface Distance
% Specify the spherical distance between Munich and Bangalore in degrees
% and the mean radius of Earth in kilometers. Compute the distance
% (measured along the Earth's surface) between Munich and Bangalore, in kilometers.

% Copyright 2015 The MathWorks, Inc.


D = 64.7;
radEarth = 6371;
R = deg2rad(D);
dist = radEarth*R