viewArray

System object: phased.PartitionedArray
Package: phased

View array geometry

Syntax

viewArray(H)
viewArray(H,Name,Value)
hPlot = viewArray(___)

Description

viewArray(H) plots the geometry of the array specified in H.

viewArray(H,Name,Value) plots the geometry of the array, with additional options specified by one or more Name,Value pair arguments.

hPlot = viewArray(___) returns the handles of the array elements in the figure window. All input arguments described for the previous syntaxes also apply here.

Input Arguments

H

Array object.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

'ShowIndex'

Vector specifying the element indices to show in the figure. Each number in the vector must be an integer between 1 and the number of elements. You can also specify the value 'All' to show indices of all elements of the array or 'None' to suppress indices.

Default: 'None'

'ShowNormals'

Set this value to true to show the normal directions of all elements of the array. Set this value to false to plot the elements without showing normal directions.

Default: false

'ShowTaper'

Set this value to true to specify whether to change the element color brightness in proportion to the element taper magnitude. When this value is set to false, all elements are drawn with the same color. The default value is false.

Default: false

'ShowSubarray'

Vector specifying the indices of subarrays to highlight in the figure. Each number in the vector must be an integer between 1 and the number of subarrays. You can also specify the value 'All' to highlight all subarrays of the array or 'None' to suppress the subarray highlighting. The highlighting uses different colors for different subarrays, and white for elements that occur in multiple subarrays.

Default: 'All'

'Title'

Character vector specifying the title of the plot.

Default: 'Array Geometry'

Output Arguments

hPlot

Handles of array elements in figure window.

Examples

expand all

Display the geometry of a uniform linear array having overlapped subarrays.

Create a 16-element ULA that has five 4-element subarrays. Some elements occur in more than one subarray.

h = phased.ULA(16);
ha = phased.PartitionedArray('Array',h,...
    'SubarraySelection',...
    [1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0;...
    0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0;...
    0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0;...
    0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0;...
    0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1]);

Display the geometry of the array, highlighting all subarrays.

viewArray(ha);

Each color other than white represents a different subarray. White represents elements that occur in multiple subarrays.

Examine the overlapped subarrays by creating separate figures that highlight the first, second, and third subarrays. In each figure, dark blue represents the highlighted elements.

for idx = 1:3
    figure;
    viewArray(ha,'ShowSubarray',idx,...
        'Title',['Subarray #' num2str(idx)]);
end