11-15-2012 09:09 PM
Hi,
I have a 2D array of binary.
- I want to compare all rows against each other.
- Two rows should be compared if they have only one different element.
- The result of comparison should be a row with the different element assigned as 2 (or any number different from 0, 1).
- Continue to compare the result rows against each other.
- Repeat it until no row can be compare (those final rows should be presented).
Any idea will be appreciated!
Solved! Go to Solution.
11-16-2012 01:05 AM
sangquang wrote:I have a 2D array of binary.
"Binary" is not a type. deep down, everything is binary one way or another. What do you actually have?
sangquang wrote:- Two rows should be compared if they have only one different element.
You have your oder of operations mixed up! You need to compare them first before you know if they have different elements.
sangquang wrote:- The result of comparison should be a row with the different element assigned as 2 (or any number different from 0, 1).
Please explain
sangquang wrote:- Repeat it until no row can be compare (those final rows should be presented).
Presented how? To the user? Does that mean all the result of the earlier row comparisons should not be presented? Why not?
You post makes very little sense. Please attach a simple VI that contains a simple example of your 2D array (make current value default before saving). Then tell us what kind of result you would expect.
11-16-2012 01:29 AM
Hi altenbach,
I'm trying to programming Quine McCluskey method (minimizing logic functions having many variables).
You might want to take a look at this: http://en.wikipedia.org/wiki/Quine%E2%80%93McCluskey_algorithm
The attached file is what I have done so far.
I haven't found a good way for days. You could be my last hope. Thanks.
11-16-2012 01:36 AM
Your controls don't contain any default data.
11-16-2012 01:43 AM
I think I don't know how to keep current value default.
You can input numbers into the string (separated by space), for examle: 0 1 3 4 5 8.
11-16-2012 01:50 AM
Right-click...advanced...make current value default. Save the VI.
Your code is exceedingly complicated. Here's code that basically does the same. I have a look at the algortithm later (probably not today).
11-16-2012 01:57 AM
Thanks. I'm looking forward to your answer.
11-16-2012 02:46 AM
@altenbach wrote:
Right-click...advanced...make current value default. Save the VI.
Your code is exceedingly complicated. Here's code that basically does the same. I have a look at the algortithm later (probably not today).
In 2009 or atleast 2011 version code please.
11-16-2012 04:05 PM
@sangquang wrote:
Thanks. I'm looking forward to your answer.
No, you should try to solve it yourself. 😄
11-17-2012 04:16 AM
hi Altenbach,
It's my pleasure that you can point out a way for me.
This is where I get stuck.