background image

CLAD Homework 2 Solutions 

1.  

There is no need to make an array of arrays since you can simply add dimensions to 
an existing array. 

2.  

The Initialize Array function creates an array with a length specified by dimension 
size. The value of each element is specified by the element input. To initialize 
multidimensional arrays, you can simply expand the Initialize Array function to 
display more dimension size inputs. 

3.  C 

The Array Subset function takes and input array and returns a section of that array 
as specified, starting at the given index and continuing for a number of elements 
equal to length. Here, the index value 3 specifies the fourth element of the array, or 
10. Since the specified length is value 4, an array of length 4 is returned as follows: 
{10, 8, 5, 7}. 

4.  

Rings can use any numeric representation while enums can use only unsigned 
integers. 

5.  

When given a multidimensional array, the Array Size function will output a 1D array 
containing the size of each dimension. The order of arrays is always row first, 
column second. Thus, the correct answer is A since there are 2 rows and 3 columns. 

6.  

When doing array arithmetic, LabVIEW will force the output to be the size of the 
smaller input. In this case, the output will be a 1D array with two elements. The 
elements are 75-100 and 50-25, or {-25, 25}. 

7.  

Clusters allow grouping of data into structures. This cleans up block diagrams by 
minimizing the number of wires and terminals required. Data types may be mixed in 
clusters. 

 

background image

8.  

Since the .ctl file was saved as a Control and not a Type Def. or a Strict Type Def., 
the change to the file does not update instances of the control. 

9.  

Because there are different data types (string, numeric) a cluster should be used to 
store them all together. 

10.  

A type def forces the data type of each instance to be identical. If the type def cluster 
is updated to contain another integer, it will change all of the instances of that type 
def.