www.gusucode.com > phased 案例源码 matlab代码程序 > phased/CalculateResponseCosineAntennaExample.m
%% Calculate Response of Cosine Antenna % Construct a cosine pattern antenna % and calculate its response at boresight (0 degrees azimuth and % 0 degrees elevation). Then, plot the antenna pattern. Assume the antenna works between % 800 MHz and 1.2 GHz and its operating frequency is 1 GHz. %% % *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 the azimuth exponent to 1.5 and elevation exponent to 2.5. antenna = phased.CosineAntennaElement('FrequencyRange',[800e6 1.2e9],... 'CosinePower',[1.5 2.5]); fc = 1e9; resp = antenna(fc,[0;0]); pattern(antenna,fc,0,[-90:90],'Type','powerdb','CoordinateSystem','polar') %% % pattern(antenna,fc,[-180:180],0,'Type','powerdb','CoordinateSystem','polar')