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

    %% Subarray Response
% Calculate the response at boresight for two 2-element ULA arrays that
% form subarrays of a 4-element ULA array of short-dipole antenna elements.
%%
% *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)|.
%%
% Create a two-element ULA of short-dipole antenna elements. Then, arrange
% two copies to form a 4-element ULA.
antenna = phased.ShortDipoleAntennaElement;
array = phased.ULA('Element',antenna,'NumElements',2,'ElementSpacing',0.5);
replicatedarray = phased.ReplicatedSubarray('Subarray',array,...
    'Layout','Rectangular','GridSize',[1 2],...
    'GridSpacing','Auto');
%%
% Find the response of each subarray at boresight. Assume the operating
% frequency is 1 GHz and the wave propagation speed is the speed of light.
c = physconst('LightSpeed');
resp = replicatedarray(1.0e9,[0;0],c)