Array下載 PDF選擇的小節所選的小節與子小節完整手冊已更新2025-07-30閱讀時間為 4 分鐘LabVIEWAPI 參考LabVIEW G Use the Array functions to create and manipulate arrays. Examples Refer to the following example files included with LabVIEW. labview\examples\Arrays Array Size FunctionReturns the number of elements in each dimension of array.Index ArrayReturns the element or subarray of n-dimension array at index.Replace Array SubsetReplaces an element or subarray in an array at the point you specify in index.Insert Into ArrayInserts an element or subarray into n-dim array at the point you specify in index.Delete From ArrayDeletes 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.Initialize ArrayCreates an n-dimensional array in which every element is initialized to the value of element.Build ArrayConcatenates multiple arrays or appends elements to an n-dimensional array.Array SubsetReturns a portion of array starting at index and containing length elements.Array Max & Min FunctionReturns the maximum and minimum values found in array, along with the indexes for each value.Reshape ArrayChanges the dimensions of an array according to the values of dimension size 0..m-1.Sort 1D Array FunctionReturns a sorted version of array with the elements arranged in ascending order. If array is an array of clusters, the function sorts the elements by comparing the first elements. If the first elements match, the function compares the second and subsequent elements. The connector pane displays the default data types for this polymorphic function.Sort 2D ArrayRearranges the rows or columns of a 2D array by sorting the elements in the specified column or row in ascending order.Shuffle 1D ArrayRearranges the elements of a 1D array in a pseudorandom order.Shuffle 2D ArrayRearranges the elements of a 2D array in a pseudorandom order.Reverse 1D Array FunctionReverses the order of the elements in array, where array is of any type.Search 1D Array FunctionSearches 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. The connector pane displays the default data types for this polymorphic function.Split 1D Array FunctionDivides array at index and returns the two portions with the element of index at the beginning of second subarray.Rotate 1D Array FunctionRotates the elements of array the number of places and in the direction indicated by n.Increment Array ElementAdds 1 to the specified elements of a 1D array. If the array is an array of timestamps, this VI increments the element by one second.Decrement Array ElementSubtracts 1 from the specified element of a 1D array. If the array is an array of timestamps, this VI decrements the element by one second.Interpolate 1D Array FunctionLinearly interpolates a decimal y value from an array of numbers or points using a fractional index or x value.Threshold 1D Array FunctionInterpolates 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 or equal to the value of the first element and less than or equal to the value of the second element.Interleave 1D ArraysInterleaves corresponding elements from the input arrays into a single output array.Decimate 1D ArrayDivides the elements of array into the output arrays, placing elements into the outputs successively. This function drops any elements that cause the output arrays to have different lengths.Transpose 2D Array FunctionRearranges the elements of 2D array such that 2D array[i,j] becomes transposed array[j,i].Array ConstantUse this constant to supply a constant array value to the block diagram.Array To Cluster FunctionConverts a 1D array to a cluster of elements of the same type as the array elements. Double-click the function to open the Cluster Size dialog box and set the number of elements in the cluster.Cluster To Array FunctionConverts a cluster of elements of the same data type to a 1D array of elements of the same data type.Array To Matrix VIConverts 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.Matrix To Array VIConverts 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.Remove Duplicates From 1D ArrayRemoves duplicate elements from a 1D array. This VI preserves the original order of the elements.UnsortedUse the Unsorted Array functions to manipulate arrays without sorting first.Sorted ArrayUse the Sorted Array functions to manipulate sorted arrays while maintaining the sorted order.MatrixUse the Matrix functions to manipulate the elements, diagonals, and submatrices of a matrix or 2D numeric array. Many of these functions complement existing array operations but offer functionality for math algorithms based on matrices.Parent topic: Programming
Use the Array functions to create and manipulate arrays. Examples Refer to the following example files included with LabVIEW. labview\examples\Arrays Array Size FunctionReturns the number of elements in each dimension of array.Index ArrayReturns the element or subarray of n-dimension array at index.Replace Array SubsetReplaces an element or subarray in an array at the point you specify in index.Insert Into ArrayInserts an element or subarray into n-dim array at the point you specify in index.Delete From ArrayDeletes 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.Initialize ArrayCreates an n-dimensional array in which every element is initialized to the value of element.Build ArrayConcatenates multiple arrays or appends elements to an n-dimensional array.Array SubsetReturns a portion of array starting at index and containing length elements.Array Max & Min FunctionReturns the maximum and minimum values found in array, along with the indexes for each value.Reshape ArrayChanges the dimensions of an array according to the values of dimension size 0..m-1.Sort 1D Array FunctionReturns a sorted version of array with the elements arranged in ascending order. If array is an array of clusters, the function sorts the elements by comparing the first elements. If the first elements match, the function compares the second and subsequent elements. The connector pane displays the default data types for this polymorphic function.Sort 2D ArrayRearranges the rows or columns of a 2D array by sorting the elements in the specified column or row in ascending order.Shuffle 1D ArrayRearranges the elements of a 1D array in a pseudorandom order.Shuffle 2D ArrayRearranges the elements of a 2D array in a pseudorandom order.Reverse 1D Array FunctionReverses the order of the elements in array, where array is of any type.Search 1D Array FunctionSearches 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. The connector pane displays the default data types for this polymorphic function.Split 1D Array FunctionDivides array at index and returns the two portions with the element of index at the beginning of second subarray.Rotate 1D Array FunctionRotates the elements of array the number of places and in the direction indicated by n.Increment Array ElementAdds 1 to the specified elements of a 1D array. If the array is an array of timestamps, this VI increments the element by one second.Decrement Array ElementSubtracts 1 from the specified element of a 1D array. If the array is an array of timestamps, this VI decrements the element by one second.Interpolate 1D Array FunctionLinearly interpolates a decimal y value from an array of numbers or points using a fractional index or x value.Threshold 1D Array FunctionInterpolates 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 or equal to the value of the first element and less than or equal to the value of the second element.Interleave 1D ArraysInterleaves corresponding elements from the input arrays into a single output array.Decimate 1D ArrayDivides the elements of array into the output arrays, placing elements into the outputs successively. This function drops any elements that cause the output arrays to have different lengths.Transpose 2D Array FunctionRearranges the elements of 2D array such that 2D array[i,j] becomes transposed array[j,i].Array ConstantUse this constant to supply a constant array value to the block diagram.Array To Cluster FunctionConverts a 1D array to a cluster of elements of the same type as the array elements. Double-click the function to open the Cluster Size dialog box and set the number of elements in the cluster.Cluster To Array FunctionConverts a cluster of elements of the same data type to a 1D array of elements of the same data type.Array To Matrix VIConverts 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.Matrix To Array VIConverts 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.Remove Duplicates From 1D ArrayRemoves duplicate elements from a 1D array. This VI preserves the original order of the elements.UnsortedUse the Unsorted Array functions to manipulate arrays without sorting first.Sorted ArrayUse the Sorted Array functions to manipulate sorted arrays while maintaining the sorted order.MatrixUse the Matrix functions to manipulate the elements, diagonals, and submatrices of a matrix or 2D numeric array. Many of these functions complement existing array operations but offer functionality for math algorithms based on matrices.Parent topic: Programming
Use the Array functions to create and manipulate arrays. Examples Refer to the following example files included with LabVIEW. labview\examples\Arrays Array Size FunctionReturns the number of elements in each dimension of array.Index ArrayReturns the element or subarray of n-dimension array at index.Replace Array SubsetReplaces an element or subarray in an array at the point you specify in index.Insert Into ArrayInserts an element or subarray into n-dim array at the point you specify in index.Delete From ArrayDeletes 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.Initialize ArrayCreates an n-dimensional array in which every element is initialized to the value of element.Build ArrayConcatenates multiple arrays or appends elements to an n-dimensional array.Array SubsetReturns a portion of array starting at index and containing length elements.Array Max & Min FunctionReturns the maximum and minimum values found in array, along with the indexes for each value.Reshape ArrayChanges the dimensions of an array according to the values of dimension size 0..m-1.Sort 1D Array FunctionReturns a sorted version of array with the elements arranged in ascending order. If array is an array of clusters, the function sorts the elements by comparing the first elements. If the first elements match, the function compares the second and subsequent elements. The connector pane displays the default data types for this polymorphic function.Sort 2D ArrayRearranges the rows or columns of a 2D array by sorting the elements in the specified column or row in ascending order.Shuffle 1D ArrayRearranges the elements of a 1D array in a pseudorandom order.Shuffle 2D ArrayRearranges the elements of a 2D array in a pseudorandom order.Reverse 1D Array FunctionReverses the order of the elements in array, where array is of any type.Search 1D Array FunctionSearches 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. The connector pane displays the default data types for this polymorphic function.Split 1D Array FunctionDivides array at index and returns the two portions with the element of index at the beginning of second subarray.Rotate 1D Array FunctionRotates the elements of array the number of places and in the direction indicated by n.Increment Array ElementAdds 1 to the specified elements of a 1D array. If the array is an array of timestamps, this VI increments the element by one second.Decrement Array ElementSubtracts 1 from the specified element of a 1D array. If the array is an array of timestamps, this VI decrements the element by one second.Interpolate 1D Array FunctionLinearly interpolates a decimal y value from an array of numbers or points using a fractional index or x value.Threshold 1D Array FunctionInterpolates 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 or equal to the value of the first element and less than or equal to the value of the second element.Interleave 1D ArraysInterleaves corresponding elements from the input arrays into a single output array.Decimate 1D ArrayDivides the elements of array into the output arrays, placing elements into the outputs successively. This function drops any elements that cause the output arrays to have different lengths.Transpose 2D Array FunctionRearranges the elements of 2D array such that 2D array[i,j] becomes transposed array[j,i].Array ConstantUse this constant to supply a constant array value to the block diagram.Array To Cluster FunctionConverts a 1D array to a cluster of elements of the same type as the array elements. Double-click the function to open the Cluster Size dialog box and set the number of elements in the cluster.Cluster To Array FunctionConverts a cluster of elements of the same data type to a 1D array of elements of the same data type.Array To Matrix VIConverts 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.Matrix To Array VIConverts 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.Remove Duplicates From 1D ArrayRemoves duplicate elements from a 1D array. This VI preserves the original order of the elements.UnsortedUse the Unsorted Array functions to manipulate arrays without sorting first.Sorted ArrayUse the Sorted Array functions to manipulate sorted arrays while maintaining the sorted order.MatrixUse the Matrix functions to manipulate the elements, diagonals, and submatrices of a matrix or 2D numeric array. Many of these functions complement existing array operations but offer functionality for math algorithms based on matrices.Parent topic: Programming