This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


System object: phased.ReplicatedSubarray
Package: phased

View array geometry


hPlot = viewArray(___)


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


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 single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.


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 as 'All' to show indices of all elements of the array or 'None' to suppress indices.

Default: 'None'


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


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.

Default: false


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 as 'All' to highlight all subarrays of the array or 'None' to suppress subarray highlighting. Highlighting uses different colors for different subarrays.

Default: 'All'


Character vector specifying the title of the plot.

Default: 'Array Geometry'

Output Arguments


Handles of array elements in figure window.


expand all

This example shows how to construct a full array by replicating subarrays.

Create a hexagonal array to use as a subarray.

Nmin = 9;
Nmax = 17;
dy = 0.5;
dz = 0.5*sin(pi/3);
rowlengths = [Nmin:Nmax Nmax-1:-1:Nmin];
numels_hex = sum(rowlengths);
stopvals = cumsum(rowlengths);
startvals = stopvals-rowlengths+1;
pos = zeros(3,numels_hex);
rowidx = 0;
for m = Nmin-Nmax:Nmax-Nmin
    rowidx = rowidx+1;
    idx = startvals(rowidx):stopvals(rowidx);
    pos(2,idx) = (-(rowlengths(rowidx)-1)/2:...
        (rowlengths(rowidx)-1)/2) * dy;
    pos(3,idx) = m*dz;
hexa = phased.ConformalArray('ElementPosition',pos,...

Arrange copies of the hexagonal array on a sphere.

radius = 9;
az = [-180 -180 -180 -120 -120 -60 -60   0  0  60 60 120 120 180];
el = [-90   -30   30  -30   30 -30  30 -30 30 -30 30 -30  30  90];
numsubarrays = size(az,2);
[x,y,z] = sph2cart(deg2rad(az),deg2rad(el),...
ha = phased.ReplicatedSubarray('Subarray',hexa,...
    'SubarrayPosition',[x; y; z], ...
    'SubarrayNormal',[az; el]);

Display the geometry of the array, highlighting selected subarrays with different colors.

    'Title','Hexagonal Subarrays on a Sphere');

Was this topic helpful?