07-30-2013 01:50 PM
Hello,
I have two listboxes. One of them has different frequences and the other one has difference voltages.
For each interation, one freq and one voltage should be seleted and the correspoding elements in the boolean array should be high.
Freq Voltage
100 2
200 < 4 ====> 0100 0010
300 6 <
400 8
Does anyone know how to do the convertion from numerical listboxes to the boolean array?
Thanks!
Solved! Go to Solution.
07-30-2013 02:00 PM - edited 07-30-2013 02:01 PM
07-30-2013 02:19 PM
Thank you for your answer.
Actually there 5 frequecies and 8 output voltages.
But the the boolean array output is in an inner loop and the listboxes are outside of the inner loop.
How should I arrange these listboxes?
07-30-2013 02:25 PM
Thank you. I got it. Please ignore the previous reply.
07-30-2013 02:46 PM
07-30-2013 03:03 PM
@jcarmody wrote:
I should have gone to Perdue...
Are you trying to get a honorable mention in the Rube Goldberg thread? 😄
(Also, the output is supposed to be a boolean array, not a U8 numeric.)
07-30-2013 04:13 PM
I found a problem for the listbox.
If the I just select two freq from the listbox, the indexes are always 1,2 but not 2,3.
How should I solve this problem because not all of the values in the listboxes will be selected.
Thanks,
Tianshu
07-30-2013 04:42 PM
Well, you did not tell us that you allow multiple selections. Still, it should be easy to modify my example. Can you attach some simplified code.
07-30-2013 04:54 PM - edited 07-30-2013 04:55 PM