www.gusucode.com > phased 案例源码 matlab代码程序 > phased/WidebandPolarizedFieldsFrom5ElementULAExample.m
%% Radiate Wideband Polarized Fields from Array % Examine the polarized field produced by the wideband radiator from a % five-element uniform line array (ULA) composed 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)|. %% % Set up the ULA of five short-dipole antennas with % polarization enabled. The element spacing is set to 1/2 wavelength of the % carrier frequency. % Construct the wideband radiator System object(TM). % fc = 100e6; c = physconst('LightSpeed'); lam = c/fc; antenna = phased.ShortDipoleAntennaElement; array = phased.ULA('Element',antenna,'NumElements',5,'ElementSpacing',lam/2); % Radiate a signal consisting of the sum of three sine waves. Radiate the % signal into two different directions. Radiated angles are azimuth and elevation % angles defined with respect to a local coordinate system. The local % coordinate system is defined by 10 degree rotation around the x-axis from % the global coordinates. fs = 25e6; f1 = 2e6; f2 = 10e6; f3 = 11e6; dt = 1/fs; fc = 100e6; t = [0:dt:100e-6]; sig = 5.0*sin(2*pi*f1*t) + 2.0*sin(2*pi*f2*t + pi/10) + 4*sin(2*pi*f3*t + pi/2); radiatingAngle = [30 30; 0 20]; laxes = rotx(10); radiator = phased.WidebandRadiator('Sensor',array,'SampleRate',fs,... 'CarrierFrequency',fc,'EnablePolarization',true); y = radiator(sig.',radiatingAngle,laxes); %% % % Plot the first 200 samples of the _y_ and _z_ components of the polarized % field propagating in the |[30,0]| direction. plot(10^6*t(1:200),real(y(1).Y(1:200))) hold on plot(10^6*t(1:200),real(y(1).Z(1:200))) hold off xlabel('Time (\mu sec)') ylabel('Amplitude') legend('Y Polarization','Z Polarization')