Returns a portion of array starting at index and containing length elements.


icon

Inputs/Outputs

  • c1ddbl.png array

    array can be an n-dimensional array of any type.

  • ci32.png index

    index specifies the first element, row, column, or page to include in the portion of array you want to return.

    If index is less than 0, the function treats it as 0. If index is greater than or equal to the array size, the function returns an empty array.

  • ci32.png length

    length specifies how many elements, rows, columns, or pages to include in the portion of array you want to return. If index plus length is larger than the size of the array, the function returns only as much data as is available.

    The default is the length from index to the end of array. If length is less than 0, the function treats it as 0.

  • i1duvoid.png subarray

    subarray is of the same type as array.

  • When you wire an array to this function, the function resizes automatically to display index and length inputs for each dimension in the array. If you wire a 1D array to the function, the function displays the index inputs for an element. If you wire a 2D array to the function, the function displays the index inputs for a row and column, respectively. If you wire a 3D through nD array to the function, the function displays the index inputs for a page.

    The connector pane displays the default data types for this polymorphic function.

    You can use the Index Array function to modify the shape of the subarray. For example, if the input to an Index Array function is a 2D array and you wire only the row input, you extract a complete 1D row of the array.

    FPGA Module Details

    The following details apply when you use this object in an FPGA VI.

    Note The following details are subject to change with each version of the LabVIEW FPGA Module.
    Single-Cycle Timed Loop Supported.
    Usage The LabVIEW FPGA Module supports only one-dimensional arrays that resolve to a single size at compile time. The index and length inputs must be constant so that LabVIEW can determine the size of subarray. You can either wire constant values directly to this function, or rely on value propagation through constant folding.
    Timing This function requires no clock cycles to execute because it does not include an internal register.
    Resources This function consumes no FPGA resources because it is purely a wiring operation.