www.gusucode.com > phased 案例源码 matlab代码程序 > phased/TwoRayRangeAngleExample.m
%% Two-Ray Range and Angle % Compute the two-ray propagation distances and arrival angles of rays from % a source located at _(1000,1000,500)_ meters from the origin. The % receiver is located at _(100,100,200)_ meters from the origin. % % Copyright 2015 The MathWorks, Inc. sourceLoc = [1000;1000;500]; receiverLoc = [100;100;200]; [sourcerngs,sourceangs] = rangeangle(sourceLoc,receiverLoc,'two-ray') %% % % <<../ex95401122.png>> % %% % Find the range and angle of the same target with the same origin but with % respect to a local coordinate axes. The local coordinate axes are rotated % around the z-axis by 45 degrees from the global coordinate axes. refaxes = rotz(45); [sourcerngs,sourceangs] = rangeangle(sourceLoc,receiverLoc,refaxes,'two-ray')