LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Numeric to boolean array

Hello All,

 

I am working on a program in which I can input a nXy array of enumerator which has 3 numeric values of 0,1,2. The values of 0,1,2 correspond to 3 cases of  constant boolean values. Numeric and its corresponding boolean values are given below:

 

Numeric Value : 0, Boolean values :  False, False

Numeric Value : 1: Boolean Values: True, False

Numeric Value : 2: Boolean Values : True, True.

 

Thus my nXy array of numeric values hwould get transformed to nX 2y array of boolean values with 2 boolean values corresponding to each numeric element of the array. The image shows the tranformation which I am trying to do.

 

To make this work, I took the numeric array and added 2 for loops ( one for row and one for column ) and checked each element of the array for the 3 cases. 0,1,2. In each case I have the boolean contants corresponding to the case. Since the nth element in the  numeric array will lead to correspoding boolean values in (2*n),(2*n)+1 elements  of the array I have a corresponding program for that too.

 

However when I output the results, it doesnt seem to come out properly and I am not sure where the logic is going wrong. If anyone can help me with this, it will be great.

 

 

Download All
0 Kudos
Message 1 of 2
(2,372 Views)
0 Kudos
Message 2 of 2
(2,359 Views)