Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Array Functions

LabVIEW 2011 Help

Edition Date: June 2011

Part Number: 371361H-01

»View Product Info

Requires: Base Package. This topic might not match its corresponding palette in LabVIEW depending on your operating system, licensed product(s), and target.

Use the Array functions to create and manipulate arrays.

Example

Palette ObjectDescription
Array ConstantUse this constant to supply a constant array value to the block diagram.
Array Max & MinReturns the maximum and minimum values found in array, along with the indexes for each value.
Array SizeReturns the number of elements in each dimension of array.
Array SubsetReturns a portion of array starting at index and containing length elements.
Array To ClusterConverts a 1D array to a cluster of elements of the same type as the array elements. Right-click the function and select Cluster Size from the shortcut menu to set the number of elements in the cluster.
Array To MatrixConverts an array to a matrix of elements of the same type as the array elements. Wire data to the Real 2D Array input to determine the polymorphic instance to use or manually select the instance.
Build ArrayConcatenates multiple arrays or appends elements to an n-dimensional array.
Cluster To ArrayConverts a cluster of elements of the same data type to a 1D array of elements of the same data type.
Decimate 1D ArrayDivides the elements of array into the output arrays, placing elements into the outputs successively.
Delete From ArrayDeletes an element or subarray from n-dim array and returns the edited array in array w/ subset deleted and the deleted element or subarray in deleted portion.
Index ArrayReturns the element or subarray of n-dimension array at index.
Initialize ArrayCreates an n-dimensional array in which every element is initialized to the value of element.
Insert Into ArrayInserts an element or subarray into n-dim array at the point you specify in index.
Interleave 1D ArraysInterleaves corresponding elements from the input arrays into a single output array.
Interpolate 1D ArrayLinearly interpolates a decimal y value from an array of numbers or points using a fractional index or x value.
Matrix To ArrayConverts a matrix of elements to an array of elements of the same data type. Wire data to the Real Matrix input to determine the polymorphic instance to use or manually select the instance.
Replace Array SubsetReplaces an element or subarray in an array at the point you specify in index.
Reshape ArrayChanges the dimensions of an array according to the values of dimension size 0..m-1.
Reverse 1D ArrayReverses the order of the elements in array.
Rotate 1D ArrayRotates the elements of array the number of places and in the direction indicated by n.
Search 1D ArraySearches for an element in a 1D array starting at start index. Because the search is linear, you need not sort the array before calling this function. LabVIEW stops searching as soon as the element is found.
Sort 1D ArrayReturns a sorted version of array with the elements arranged in ascending order.
Split 1D ArrayDivides array at index and returns the two portions with the element of index at the beginning of second subarray.
Threshold 1D ArrayInterpolates points in a 1D array that represents a 2D non-descending graph. This function compares threshold y to the values in array of numbers or points starting at start index until it finds a pair of consecutive elements such that threshold y is greater than the value of the first element and less than or equal to the value of the second element.
Transpose 2D ArrayRearranges the elements of 2D array such that 2D array[i,j] becomes transposed array[j,i].

Example

Refer to the labview\examples\general\arrays.llb for examples of using the Array Functions.


 

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