Delete From Array Function

LabVIEW 2018 Help

Edition Date: March 2018
Part Number: 371361R-01
View Product Info

DOWNLOAD (Windows Only)

LabVIEW 2016 Help
LabVIEW 2017 Help
LabVIEW 2018 Help
LabVIEW 2019 Help
LabVIEW 2020 Help

Owning Palette: Array Functions

Requires: Base Development System

Deletes an element or subarray from n-dim array of length elements starting at index. Returns the edited array in array w/ subset deleted and the deleted element or subarray in deleted portion.

When you wire an array to this function, the function resizes automatically to display index inputs for each dimension in the array.


n-dim array is the array from which you want to delete element(s), row(s), column(s), page(s), and so on. This input can be an n-dimension array of any type.
length determines how many elements, rows, columns, or pages to delete. The default length is one element.
index 0..n-1 specifies what you want to delete from the array, such as an element, row, column, or page. Array functions in LabVIEW access array data in row-major order. In a 2D array, row is the first, major index. Column is the last, minor index. In bigger multidimensional arrays, column remains the last index and the more major indexes are added to the front. Thus, vol is the first index, followed by page, row, and column. These names are index identifiers and have no other meaning.

The default is the index of the last element in the array. You can wire only one index input.
array w/ subset deleted is the array returned with the deleted element(s), row(s), column(s), or page(s).
deleted portion is the deleted element or array. If you wire a value to length, deleted portion is an array of the same number of dimensions as n-dim array containing all the elements deleted from n-dim array. The outer dimension size of deleted portion is the value of length, and the inner dimension size(s) match that of n-dim array. For example, if you wire a 3D array of dimensions 10x4x6 to n-dim array and a value of 2 to length, and do not wire values to the index inputs, deleted portion is a 3D array of dimensions 2x4x6 containing the last 2 pages from n-dim array.

If you wire a value to length and a negative value to the index, deleted portion is an array with an outer dimension size of the value of length minus the absolute value of the index. If the index is a negative value and the value of length is smaller than the absolute value of the index, deleted portion is empty.

If you do not wire a value to length, deleted portion is an array of one less dimension than n-dim array containing the portion of the array deleted from n-dim array. For example, if you wired a 2D array of dimensions 8x5 to n-dim array and do not wire a value to length, and wire 3 to index 0 (row), deleted portion is a 1D array containing all elements from row 3 of n-dim array.

Delete From Array Details

This function reduces the array in one dimension only, therefore, you can wire only one index input. For example, to delete a row in a 2D array, wire only the row index. To delete a column, wire only the column index. You can delete multiple consecutive subarrays at once by wiring length.


Not Helpful