LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

convertig numeric array to boolean array

There are any way to convert numeric array to boolean array?

Any help will be appreciated
0 Kudos
Message 1 of 3
(2,811 Views)
using the functions under the numeric >> conversion palette you should be able to do this with ease. There is a number to boolean array function that might help.
BJD1613

Lead Test Tools Development Engineer

Philips Respironics

Certified LV Architect / Instructor
0 Kudos
Message 2 of 3
(2,806 Views)
Hmmm... your question is ambiguous. Could you clarify what you mean?

(1) Do you want each numeric element to translate into a single boolean (e.g. all zeroes to false and everything else to true)?

---> In this case you could e.g. feed your array through a "not equal zero" node from the boolean palette.


(2) Do you want to create a 2D array with each column corresponding to the bits in each integer and each row corresponding to each integer or vice versa?

---> Feed it in an autoindexing FOR loop containing a "number to boolean array" node. The 2D boolean array will emerge on an autoidexing terminal on the right border.

(3) Are you thinking about something completely different?
0 Kudos
Message 3 of 3
(2,795 Views)