LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

binary string to map with boolean array problem

hi,
what i have is a binary string and a boolean array.  if the boolean array has a true value, then i would like to insert the first binary string value into a new array at that index.  the next true value in the boolean array would get the second binary string value and so forth.  the numbe of string values will match the boolean true values.

so what i did was for example, i had a string of "10" and a boolean array of FFTFTFF.  if the "F" will be a 0 so the output array will be 0010000.  i tried to use a for loop and run the loop the string length of the "10".  i then separated the "10" into its own array with a 1 at index 0 and a 0 at index 1.  i then converted the boolean array to a numeric array and then searced for a 1 and used that index to insert the string array value into it.

i attaced my vi and the output should be 0010000 but i get 0001010,

thanks,
lfoitek
0 Kudos
Message 1 of 4
(4,111 Views)
I couldn't quite see what you are doing since I don't have your sub-vi's. 

Here is how I would do it:


>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
Message 2 of 4
(4,103 Views)
thank you
0 Kudos
Message 3 of 4
(4,097 Views)

Maybe something like this?



Message Edited by altenbach on 01-29-2008 09:58 AM
Download All
Message 4 of 4
(4,083 Views)