Jump to content

Converting numeric arrays into boolean arrays


Recommended Posts

Posted

Hello,

I need help in converting numeric arrays into boolean arrays. In LabVIEW, "number to boolean array" conversion is available but I couldn't find any way to convert numeric "array" into boolean array and boolean array back into numeric array.

Regards

Posted

All of the comparison primitives can operate on arrays.

The numeric to boolean array primitive makes a bitwise change from numeric to boolean.

However in most languages (and LabVIEW alike) a boolean false is a u8 with value 0.

To convert such an array to a boolean array use the <>0 primitive:

noteqtoo.gif

Ton

Posted

inside a while you put youre arrayand get each value with the array index operator... the build another array acording to the bolean value each numerc value represents...

or else...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.