clusters and arrays. array functions build an array size an array form an array from a cluster or...

13
CLUSTERS and CLUSTERS and ARRAYS ARRAYS

Upload: juniper-may

Post on 13-Dec-2015

223 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 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

CLUSTERS and CLUSTERS and ARRAYSARRAYS

Page 2: 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

Array FunctionsArray Functions Build an arrayBuild an array Size an arraySize an array Form an array from a cluster or a cluster Form an array from a cluster or a cluster

into an arrayinto an array Index an arrayIndex an array Find the max an min of an arrayFind the max an min of an array Insert and delete from an array or Insert and delete from an array or

reshapereshape Sort a lD arraySort a lD array Convert an array to matrix, or a matrix Convert an array to matrix, or a matrix

to arrayto array

Page 3: 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

Build and sizing an arrayBuild and sizing an array

Complies multiple arrays or appends elements Complies multiple arrays or appends elements to an n-dimensional array. to an n-dimensional array.

Sizing an array just shows the number of Sizing an array just shows the number of elements in the array on the front panel.elements in the array on the front panel.

Page 4: 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

Index ArrayIndex Array

Returns the element or sub-array of n-dimensionReturns the element or sub-array of n-dimension array at index. When you wire an array to this array at index. When you wire an array to this function, the function resizes automatically to function, the function resizes automatically to display index inputs for each dimension in the display index inputs for each dimension in the array you wire to n-dimension array. You also array you wire to n-dimension array. You also can add additional element or sub-array can add additional element or sub-array terminals by resizing it.   terminals by resizing it.  

Page 5: 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

Max and Min of an ArrayMax and Min of an Array

Returns the maximum and 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

Page 6: 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

Sorting an ArraySorting 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.

Page 7: 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

Converting an Array to a Converting an Array to a MatrixMatrix

Converts an array to a matrix of elements of Converts an array to a matrix of elements of the same type as the array elements .the same type as the array elements .

Can make each of the followingCan make each of the following

* to real matrix* to real matrix

* to column vector* to column vector

* to complex matrix* to complex matrix

* to complex column vector* to complex column vector

Page 8: 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

Array => cluster or cluster Array => cluster or cluster =>array=>array

Bundles each component input into a cluster and Bundles each component input into a cluster and assembles all component clusters into an array of assembles all component clusters into an array of clusters. Each cluster contains a single component. clusters. Each cluster contains a single component. Input components must be of the same type as the Input components must be of the same type as the value wired to the topmost component terminal.value wired to the topmost component terminal.

Array to cluster converts a 1D array to a cluster of Array to cluster converts a 1D array to a cluster of elements of the same type as the array elements.elements of the same type as the array elements.

Page 9: 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

ClustersClusters Can build a clusterCan build a cluster Can bundle and unbundle clustersCan bundle and unbundle clusters Can also index a clusterCan also index a cluster

Page 10: 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

Building a ClusterBuilding a Cluster

Clusters are built by bundling up a collection Clusters are built by bundling up a collection of inputs and they are complied into a cluster of inputs and they are complied into a cluster which can then be manipulated to your liking.which can then be manipulated to your liking.

They are perfect for They are perfect for organizationorganization and and complying data in a complying data in a neatneat and and uniformuniform way way that is easily represented in the front panel.that is easily represented in the front panel.

Page 11: 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

Bundling and UnbundlingBundling and Unbundling Assembles a cluster from individual elements. Assembles a cluster from individual elements. can also be use to change the values of individual elements in can also be use to change the values of individual elements in

an existing cluster without having to specify new values for all an existing cluster without having to specify new values for all elements. To do so, wire the cluster you want to change to the elements. To do so, wire the cluster you want to change to the middle middle clustercluster terminal of this function. When you wire a terminal of this function. When you wire a cluster to this function, the function resizes automatically to cluster to this function, the function resizes automatically to display inputs for each element in the cluster. Also when you display inputs for each element in the cluster. Also when you wire to the middle terminal, all other inputs are optional.wire to the middle terminal, all other inputs are optional.

Page 12: 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

Indexing A ClusterIndexing A Cluster

Indexes a set of arrays and creates a cluster Indexes a set of arrays and creates a cluster array in which matches the value of each array in which matches the value of each element to a corresponding location. Much element to a corresponding location. Much like how a matrix is set up, so that element like how a matrix is set up, so that element values are easy to locate and decifer.values are easy to locate and decifer.

Page 13: 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