Main Content

getNumElements

Number of elements in an array

Since R2021a

    Description

    N = getNumElements(array) returns the number of elements N in the array array.

    example

    Examples

    collapse all

    Create a UCA with the default number of elements. Verify that there are five elements.

    sArray = phased.UCA();
    N = getNumElements(sArray)
    N = 
    5
    

    Input Arguments

    collapse all

    Phased array, specified as a System object.

    Output Arguments

    collapse all

    Number of elements of array, returned as a positive integer.

    Extended Capabilities

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

    Version History

    Introduced in R2021a