Programmatically Deleting Elements, Rows, Columns, and Pages within Arrays

You can delete an element, row, column, or page within an array programmatically. 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. Add the Delete From Array function to 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 the number of elements, rows, columns, or pages you want to delete. In the following table, n is the total number of elements, rows, columns, pages, or dimensions in the array.
Array wired to n-dimension array Deleting Complete these steps.
1D array Element(s) Wire a value 1 through n to length. Wire a value 0 through n to index.
2D array Row(s) Wire a value 1 through n to length. Wire a value 0 through n to index (row).
Column(s) Wire a value 1 through n to length. Wire a value 0 through n to index (column).
3D through n D array Page(s) Wire a value 1 through n to length. Wire a value 0 through n to index (page).
  1. Run the VI.