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

    %% Compute ULA Steering Vector
% Compute the steering vector for a 4-element ULA at
% an operating frequency of 1 GHz. Assume that the waveform is incident on
% the array from 45° azimuth and 10° elevation.
%%
% *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)|.
fc = 1e9;
array = phased.ULA(4);
steervec = phased.SteeringVector('SensorArray',array);
sv = steervec(fc,[45;10])

%%
% You can also compute the steering vector with the following equivalent
% code.
delay = phased.ElementDelay('SensorArray',array);
tau = delay([45;10]);
exp(-1i*2*pi*fc*tau)