Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

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

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

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. Place the Delete From Array function 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 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 arrayDeletingComplete these steps.
1D arrayElement(s)Wire a value 1 through n to length.
Wire a value 0 through n to index.
2D arrayRow(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 nD arrayPage(s) Wire a value 1 through n to length.
Wire a value 0 through n to index (page).
  1. Run the VI.

Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit