Main Content

getNumElements

System object: phased.HeterogeneousConformalArray
Namespace: phased

Number of elements in array

Syntax

N = getNumElements(H)

Description

N = getNumElements(H) returns the number of elements, N, in the conformal array object H.

Examples

expand all

Construct a heterogeneous 8-element circular array and use the getNumElements method to return the number of elements.

antenna1 = phased.ShortDipoleAntennaElement('FrequencyRange',[100e6 1e9], ...
    'AxisDirection','Z');
antenna2 = phased.ShortDipoleAntennaElement('FrequencyRange',[100e6 1e9], ...
    'AxisDirection','Y');
N = 8;
azang = (0:N-1)*360/N-180;
array = phased.HeterogeneousConformalArray('ElementPosition', ...
    [cosd(azang);sind(azang);zeros(1,N)], ...
    'ElementNormal',[azang;zeros(1,N)], ...
    'ElementSet',{antenna1,antenna2}, ...
    'ElementIndices',[1 1 1 1 2 2 2 2]);
N = getNumElements(array)
N = 
8