09-28-2018 03:43 AM
hey everyone so i am trying to use the brute force method in an array string data where if there is value B it should give me two different array having 0 and 1 in the place of B. And if there are 2 B's then there should be four different arrays having values 00, 01, 10,11. can abyone help me with this ?
Solved! Go to Solution.
09-28-2018 04:18 AM
Can you give an example of data and result?
09-28-2018 04:24 AM
well if i have an array of ( 1 0 1 0 0 0 B B 1 0) it should have now four different array in place of B having values of 00 01 10 11. if you want i can explain more and it is a 1D array as well
09-28-2018 04:26 AM
and i am getting the data from and exel file and then extracting one column at a time and if there is a B in that column it will change to 0 and 1 to have to different input by using this brute force method
09-28-2018 05:30 AM
I not understand. Can you make LabVIEW FP with control and indicator?
control is what you have and indicator is what you need
09-28-2018 06:21 AM
09-29-2018 07:13 AM
sorry if i couldn't explain it before i am attaching the picture to show you what i am looking for and with the increase in that b the values should increase exponetially too like if there are 3 B's then there are 8 possible outcomes from that.if you still don't understand let me know i will explain a little bit more
09-29-2018 08:27 AM
You have a string made up of 0, 1, and B (let's say, N B's) and you want to replace all the B's with 0's or 1's to make all the different (let's call them) Binary Strings, right?
First, understand the Problem without worrying about the Solution. Let's look at having N B's (let's say the B's are called "Bits"), so you have an N-Bit String and you want to replace each Bit with 0 or 1 to make all possible N-Bit (let's call them) Binary Numbers.
Do you know how to do that? Do you know how to generate all N-Bit Binary Numbers in some "natural" order? Then all you have to do is the following:
I'll leave the Implementation of this simple scheme up to you. It will be a useful exercise in counting, logic, etc. You might find some functions on the Boolean Palette that fit nicely with this scheme. I suspect that you can "do it all" with a single For Loop, but you'll learn the most out of this exercise if you work it out on your own without much more help from the Forum (copying out a completed solution won't teach you as much as doing it yourself).
Bob Schor
10-02-2018 06:04 AM
the main problem i am coming across is if i have 0 and 1 for every B how can i place them in a 2D array because i can search the B but then using this to have that many values i can't seem to have the algorithm for that atm. so if you have any ideas you can suggest me.
10-02-2018 06:35 AM