You are here

Arrays

26 July, 2019 - 09:47
Available under Creative Commons-ShareAlike 4.0 International License. Download for free at http://cnx.org/contents/5b6e61df-b830-48cb-9764-94696cb47c80@1.3

Right click on the Front Panel window and selectArray from the Controls » Modern » Arrays, Matrix & Cluster menu, and drop an array onto the Front Panel window. The array structure consists of an index or element offset (left portion of the structure) and the array elements (right portion of the structure). When the array structure is placed on the Front Panel window, the data type of the array is undefned as indicated by the grayed out portion of the array.

media/image45.png
Figure 1.44 Arrays  

To define the array data type, drag and drop a data type onto the array structure. For instance, to create an input array of numbers, place Numeric Control into the array structure.

media/image46.png
Figure 1.45 Creating a Numeric Array 

At this point, the numeric array is an Empty or Null array because no elements of the array have been defned. This is indicated by the grayed out numeric control within the array structure.

media/image47.png
Figure 1.46 Empty Numeric Array 

Define elements of an input array by selecting the offset and entering its value. For instance, at ofset 4, enter the value 0.0. This defines Numeric Input Array as {0, 0, 0, 0, 0}.

media/image48.png
Figure 1.47 Defining Numeric Array Elements 

An output array is created similarly to an input array with the exception that an output data type needs to be dropped into the array structure.

media/image49.png
Figure 1.48 Creating Output Numeric Arrays