Main Content


Positions of array elements



    pos = getElementPosition(array) returns the element positions pos of the System object™ array.

    pos = getElementPosition(array,elemidx) returns only the positions of the elements that are specified in the element index vector elemidx.


    collapse all

    Construct a ULA with 5 elements along the z-axis. Obtain the element positions.

    sULA = phased.ULA('NumElements',5,'ArrayAxis','z');
    pos = getElementPosition(sULA)
    pos = 3×5
             0         0         0         0         0
             0         0         0         0         0
       -1.0000   -0.5000         0    0.5000    1.0000

    Input Arguments

    collapse all

    Phased array, specified as a System object.

    Element index vector, specified as a vector of positive integers each of which takes a value from 1 to N. The quantity N is the number of elements of the array.

    Example: [1,2,3]

    Output Arguments

    collapse all

    Positions of array elements, returned as a 3-by-M real matrix. Each column of pos defines the position of an element in the local coordinate system, using the form [x;y;z]. If the input argument elemidx is not specified, M is the number of elements of the array, N. If elemidx is specified, M is the dimension of elemidx. Units are in meters

    Extended Capabilities

    C/C++ Code Generation
    Generate C and C++ code using MATLAB® Coder™.

    Version History

    Introduced in R2021a