130 likes | 402 Views
CLUSTERS and ARRAYS. Array Functions. Build an array Size an array Form an array from a cluster or a cluster into an array Index an array Find the max an min of an array Insert and delete from an array or reshape Sort a lD array Convert an array to matrix, or a matrix to array.
E N D
Array Functions • Build an array • Size an array • Form an array from a cluster or a cluster into an array • Index an array • Find the max an min of an array • Insert and delete from an array or reshape • Sort a lD array • Convert an array to matrix, or a matrix to array
Build and sizing an array • Complies multiple arrays or appends elements to an n-dimensional array. • Sizing an array just shows the number of elements in the array on the front panel.
Index Array Returns the element or sub-array of n-dimensionarray at index. When you wire an array to this function, the function resizes automatically to display index inputs for each dimension in the array you wire to n-dimension array. You also can add additional element or sub-array terminals by resizing it.
Max and Min of an Array • Returns the maximumand minimum values found in array, along with the indexes for each value. The array can be an n-dimensional array of any type. • Max/min index(es) is the index for the first max/min value. If array is multidimensional, max/min index(es) is an array whose elements are the indexes for the first maximum/min value in array. • Would be good to use if you needed to know when a graph peaked or lowest value
Sorting an Array • Returns 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.
Converting an Array to a Matrix • Converts an array to a matrix of elements of the same type as the array elements . • Can make each of the following * to real matrix * to column vector * to complex matrix * to complex column vector
Array => cluster or cluster =>array • Bundles each component input into a cluster and assembles all component clusters into an array of clusters. Each cluster contains a single component. Input components must be of the same type as the value wired to the topmost component terminal. • Array to cluster converts a 1D array to a cluster of elements of the same type as the array elements.
Clusters • Can build a cluster • Can bundle and unbundle clusters • Can also index a cluster
Building a Cluster • Clusters are built by bundling up a collection of inputs and they are complied into a cluster which can then be manipulated to your liking. • They are perfect for organization and complying data in a neatand uniform way that is easily represented in the front panel.
Bundling and Unbundling • Assembles a cluster from individual elements. • can also be use to change the values of individual elements in an existing cluster without having to specify new values for all elements. To do so, wire the cluster you want to change to the middle cluster terminal of this function. When you wire a cluster to this function, the function resizes automatically to display inputs for each element in the cluster. Also when you wire to the middle terminal, all other inputs are optional.
Indexing A Cluster • Indexes a set of arrays and creates a cluster array in which matches the value of each element to a corresponding location. Much like how a matrix is set up, so that element values are easy to locate and decifer.
LABVIEW EXAMPLES! GET EXCITED!!