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

    %% Beam Pattern With and Without Steering  

% Copyright 2015 The MathWorks, Inc.


%% 
% Calculate the steering vector for a 4-element uniform linear array in
% the direction of 30 degrees azimuth and 20 degrees elevation. Assume the
% array's operating frequency is 300 MHz. 
  
fc = 3e8;
ha = phased.ULA('NumElements',4);
hsv = phased.SteeringVector('SensorArray',ha);
sv = step(hsv,fc,[30; 20]);

%% 
% Plot the beam patterns for the uniform linear array when no steering
% vector is applied (steered broadside) and when a steering vector is applied.   
      
c = hsv.PropagationSpeed;
subplot(211)
plotResponse(ha,fc,c,'RespCut','Az');
title('Without steering');
subplot(212)
plotResponse(ha,fc,c,'RespCut','Az','Weights',sv); 
title('With steering');