Main Content

pattern

Display antenna radiation pattern in Site Viewer

Description

pattern(tx) displays the 3-D antenna radiation pattern for the specified transmitter site in the current Site Viewer. By default, the function calculates the pattern using the frequency stored in TransmitterFrequency property of the transmitter site. The antenna gain (dBi) in a particular direction determines the color of the pattern.

example

pattern(tx,frequency) displays the 3-D radiation pattern for the specified transmitter site at the specified frequency.

pattern(rx,frequency) displays the 3-D radiation pattern for the specified receiver site at the specified frequency.

pattern(___,Name=Value) displays the 3-D radiation pattern with additional options specified by name-value arguments.

Examples

collapse all

Define and visualize the radiation pattern of a single transmitter site.

tx = txsite;
pattern(tx)

Transmitter site and radiation pattern displayed over satellite imagery

Import and view an STL file. The file models a small conference room with one table and four chairs.

viewer = siteviewer('SceneModel','conferenceroom.stl');

Create a transmitter site that uses a three-element uniform linear array (ULA) with an element spacing of 0.05 meters. Specify the position using Cartesian coordinates in meters.

cfgArray = arrayConfig("Size",[3 1],"ElementSpacing",0.05);
tx = txsite("cartesian", ...
    "AntennaPosition",[0; 0; 2.1], ...
    "Antenna",cfgArray);

Display the antenna pattern. Specify the size of the pattern plot as 0.4 meters.

pattern(tx,"Transparency",0.6,"Size",0.4)

Pan by left-clicking, zoom by right-clicking or by using the scroll wheel, and rotate the visualization by clicking the middle button and dragging or by pressing Ctrl and left-clicking and dragging.

Tilt the antenna by updating the AntennaAngle property of the transmitter. Display the updated pattern.

tx.AntennaAngle = [0 90];
pattern(tx,"Transparency",0.6,"Size",0.4)

Input Arguments

collapse all

Transmitter site, specified as a txsite object.

Receiver site, specified as an rxsite object.

Frequency to calculate radiation pattern, specified as a positive scalar.

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.

Example: pattern(tx,Size=2) specifies the size of the pattern plot.

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

Example: pattern(tx,'Size',2) specifies the size of the pattern plot.

Size of the pattern plot, in meters, specified as a numeric scalar. The size of the pattern plot is the distance between the antenna position and the point on the plot with the highest gain.

The default value depends on the CoordinateSystem property of the siteviewer object. When CoordinateSystem is 'geographic', the default size is 50 meters. When CoordinateSystem is 'cartesian', the default size is approximately 1/6 of the scene model size.

Data Types: double

Transparency of the pattern plot, specified as a scalar the range [0, 1], where 0 is completely transparent and 1 is completely opaque.

Data Types: double

Colormap for the pattern plot, specified as a predefined colormap name or an M-by-3 array of RGB (red, blue, green) triplets that define M individual colors.

You can view a colorbar that indicates the mapping of gain values into the colormap by clicking the transmitter or receiver site.

Data Types: double

Resolution of 3-D map, specified as "low", "medium", or "high". The resolution controls the visual quality and the time required to plot the pattern. The value "low" corresponds to the fastest and the least detailed pattern.

Data Types: double

Map for visualization of surface data, specified as a siteviewer object.1

Data Types: char | string

Version History

Introduced in R2019b

See Also

Functions


1 Alignment of boundaries and region labels are a presentation of the feature provided by the data vendors and do not imply endorsement by MathWorks®.