Madeeha Posted April 29, 2009 Report Share Posted April 29, 2009 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 Quote Link to comment
LAVA 1.0 Content Posted April 29, 2009 Report Share Posted April 29, 2009 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: Ton Quote Link to comment
Prabhu_V Posted April 29, 2009 Report Share Posted April 29, 2009 You can use a for loop and convert individual numeric values to Boolean array. for converting it back to numeric array use Boolean array to numeric in the for loop again. Quote Link to comment
335x Posted May 2, 2009 Report Share Posted May 2, 2009 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... Quote Link to comment
Madeeha Posted May 7, 2009 Author Report Share Posted May 7, 2009 QUOTE (Prabhu_V @ Apr 28 2009, 03:25 PM) You can use a for loop and convert individual numeric values to Boolean array.for converting it back to numeric array use Boolean array to numeric in the for loop again. http://file:///C:/Documents%20and%20Settings/prabhuv/Desktop/1.bmp' rel='nofollow' target="_blank"> Thanx alot! It worked! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.