Deleting Elements, Rows, Columns, and Pages within Arrays

You can delete an element, row, column, or page within an array. What you can delete depends on how many dimensions the array has. For example, you can delete a row or a column from an array of two or more dimensions. You can delete a page from an array of three or more dimensions.

Complete the following steps to delete elements, rows, columns, or pages in an array.

  1. Select the Delete From Array function on the Functions»Array palette and place it on the block diagram.
  2. Wire an array of any dimension to the n-dim array input of the Delete From Array function. The function automatically resizes based on the dimensions of the array.
  3. Determine which operation you want to perform from the following table and complete the associated steps.

    Note  The index input specifies from which element, row, column, or page you want to start deleting, with 0 being the first. The length input specifies to the number of element, rows, columns, or pages you want to delete.

    Array wired to n-dimension array Deleting Complete these steps.
    1D array Element(s) Wire a value 1-n to length.
    Wire a value 0-n to index.
    2D array Row(s) Wire a value 1-n to length.
    Wire a value 0-n to index (row).
    Column(s) Wire a value 1-n to length.
    Wire a value 0-n to index (column).
    Element(s) Wire a value 1-n to length.
    Wire a value 0-n to index (row).
    Wire a value 0-n to index (column).
    3D-nD array Page(s) Wire a value 1-n to length.
    Wire a value 0-n to index (page).
    Row(s) Wire a value 1-n to length.
    Wire a value 0-n to index (page).
    Wire a value 0-n to index (row).
    Column(s) Wire a value 1-n to length.
    Wire a value 0-n to index (page).
    Wire a value 0-n to index (column).
    Element(s) Wire a value 1-n to length.
    Wire a value 0-n to index (page).
    Wire a value 0-n to index (row).
    Wire a value 0-n to index (column).
  4. Resize the Delete From Array function to delete another element, row, column, or page from an array and repeat steps 2 and 3 above.
  5. Run the VI.