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

    %% Plane-Wave Reception Across ULA
% Simulate the reception of a 100-Hz sine wave modulated
% by a carrier frequency of 1 GHz at a 4-element ULA. Assume the angle of
% arrival of the signal is _(-90;0)_.
%%
% *Note:* This example runs only in R2016b or later. If you are using an earlier
% release, replace each call to the function with the equivalent |step|
% syntax. For example, replace |myObject(x)| with |step(myObject,x)|.
array = phased.ULA(4);
t = unigrid(0,0.001,0.01,'[)');
x = cos(2*pi*100*t)';
y = collectPlaneWave(array,x,[-90;0],1e9,physconst('LightSpeed'));
%%
% The preceding code is equivalent to the following.
steervec = phased.SteeringVector('SensorArray',array);
sv = steervec(1e9,[-90;0]);
y1 = x*sv.';