Main Content

plotResponse

System object: phased.CustomAntennaElement
Namespace: phased

Plot response pattern of antenna

Syntax

plotResponse(H,FREQ)
plotResponse(H,FREQ,Name,Value)
hPlot = plotResponse(___)

Description

plotResponse(H,FREQ) plots the element response pattern along the azimuth cut, where the elevation angle is 0. The operating frequency is specified in FREQ.

plotResponse(H,FREQ,Name,Value) plots the element response with additional options specified by one or more Name,Value pair arguments.

hPlot = plotResponse(___) returns handles of the lines or surface in the figure window, using any of the input arguments in the previous syntaxes.

Input Arguments

H

Element System object™

FREQ

Operating frequency in Hertz specified as a scalar or 1–by-K row vector. FREQ must lie within the range specified by the FrequencyVector property of H. If you set the 'RespCut' property of H to '3D', FREQ must be a scalar. When FREQ is a row vector, plotResponse draws multiple frequency responses on the same axes.

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

CutAngle

Cut angle specified as a scalar. This argument is applicable only when RespCut is 'Az' or 'El'. If RespCut is 'Az', CutAngle must be between –90 and 90. If RespCut is 'El', CutAngle must be between –180 and 180.

Default: 0

Format

Format of the plot, using one of 'Line', 'Polar', or 'UV'. If you set Format to 'UV', FREQ must be a scalar.

Default: 'Line'

NormalizeResponse

Set this value to true to normalize the response pattern. Set this value to false to plot the response pattern without normalizing it. This parameter is not applicable when you set the Unit parameter value to 'dbi'.

Default: true

OverlayFreq

Set this value to true to overlay pattern cuts in a 2-D line plot. Set this value to false to plot pattern cuts against frequency in a 3-D waterfall plot. If this value is false, FREQ must be a vector with at least two entries.

This parameter applies only when Format is not 'Polar' and RespCut is not '3D'.

Default: true

Polarization

Specify the polarization options for plotting the antenna response pattern. The allowable values are |'None' | 'Combined' | 'H' | 'V' | where

  • 'None' specifies plotting a nonpolarized response pattern

  • 'Combined' specifies plotting a combined polarization response pattern

  • 'H' specifies plotting the horizontal polarization response pattern

  • 'V' specifies plotting the vertical polarization response pattern

For antennas that do not support polarization, the only allowed value is 'None'. This parameter is not applicable when you set the Unit parameter value to 'dbi'.

Default: 'None'

RespCut

Cut of the response. Valid values depend on Format, as follows:

  • If Format is 'Line' or 'Polar', the valid values of RespCut are 'Az', 'El', and '3D'. The default is 'Az'.

  • If Format is 'UV', the valid values of RespCut are 'U' and '3D'. The default is 'U'.

If you set RespCut to '3D', FREQ must be a scalar.

Unit

The unit of the plot. Valid values are 'db', 'mag', 'pow', or 'dbi'. This parameter determines the type of plot that is produced.

Unit valuePlot type
dbpower pattern in dB scale
magfield pattern
powpower pattern
dbidirectivity

Default: 'db'

AzimuthAngles

Azimuth angles for plotting element response, specified as a row vector. The AzimuthAngles parameter sets the display range and resolution of azimuth angles for visualizing the radiation pattern. This parameter is allowed only when the RespCut parameter is set to 'Az' or '3D' and the Format parameter is set to 'Line' or 'Polar'. The values of azimuth angles should lie between –180° and 180° and must be in nondecreasing order. When you set the RespCut parameter to '3D', you can set the AzimuthAngles and ElevationAngles parameters simultaneously.

Default: [-180:180]

ElevationAngles

Elevation angles for plotting element response, specified as a row vector. The ElevationAngles parameter sets the display range and resolution of elevation angles for visualizing the radiation pattern. This parameter is allowed only when the RespCut parameter is set to 'El' or '3D' and the Format parameter is set to 'Line' or 'Polar'. The values of elevation angles should lie between –90° and 90° and must be in nondecreasing order. When you set the RespCut parameter to '3D', you can set the ElevationAngles and AzimuthAngles parameters simultaneously.

Default: [-90:90]

UGrid

U coordinate values for plotting element response, specified as a row vector. The UGrid parameter sets the display range and resolution of the U coordinates for visualizing the radiation pattern in U/V space. This parameter is allowed only when the Format parameter is set to 'UV' and the RespCut parameter is set to 'U' or '3D'. The values of UGrid should be between –1 and 1 and should be specified in nondecreasing order. You can set the UGrid and VGrid parameters simultaneously.

Default: [-1:0.01:1]

VGrid

V coordinate values for plotting element response, specified as a row vector. The VGrid parameter sets the display range and resolution of the V coordinates for visualizing the radiation pattern in U/V space. This parameter is allowed only when the Format parameter is set to 'UV' and the RespCut parameter is set to '3D'. The values of VGrid should be between –1 and 1 and should be specified in nondecreasing order. You can set the VGrid and UGrid parameters simultaneously.

Default: [-1:0.01:1]

Examples

expand all

Create a custom antenna with a cosine pattern. Then, plot the antenna's response.

Create the antenna and calculate the response. The user-defined pattern is omnidirectional in the azimuth direction and has a cosine pattern in the elevation direction. Assume the antenna works at 1 GHz.

fc = 1e9;
azang = [-180:180];
elang = [-90:90];
magpattern = mag2db(repmat(cosd(elang)',1,numel(azang)));
phasepattern = zeros(size(magpattern));
antenna = phased.CustomAntennaElement('AzimuthAngles',azang, ...
    'ElevationAngles',elang,'MagnitudePattern',magpattern, ...
    'PhasePattern',phasepattern);

Plot an elevation cut of the magnitude response as a line plot.

plotResponse(antenna,fc,'RespCut','El','ElevationAngles',[-90:0.1:90],...
    'Format','Line','Unit','mag')

Plot an elevation cut of the directivity as a line plot, showing that the maximum directivity is approximately 2 dB.

plotResponse(antenna,fc,'RespCut','El','ElevationAngles',[-90:0.1:90],...
    'Format','Line','Unit','dbi')

Create an antenna with a custom response. The user-defined pattern is omnidirectional in the azimuth direction and has a cosine pattern in the elevation direction. Assume the antenna operates at a frequency of 1 GHz. Display the 3-D response for a 60 degree range of azimuth and elevation angles centered at 0 degrees azimuth and 0 degrees elevation in 0.1 degree increments.

fc = 1e9;
azang = [-180:180];
elang = [-90:90];
magpattern = mag2db(repmat(cosd(elang)',1,numel(azang)));
phasepattern = zeros(size(magpattern));
antenna = phased.CustomAntennaElement('AzimuthAngles',azang, ...
    'ElevationAngles',elang,'MagnitudePattern',magpattern, ...
    'PhasePattern',phasepattern);
resp = antenna(fc,[0;0]);
plotResponse(antenna,fc,'RespCut','3D','AzimuthAngles',[-30:0.1:30],...
    'ElevationAngles',[-30:0.1:30],'Format','Polar','Unit','pow')

See Also

|