03-14-2014 01:32 AM - edited 03-14-2014 01:33 AM
aveo wrote:If you will take a look at the array the 6th row(starting from 0) has 10 and is not a subset of any other row.
However in Find_Overlapping_Rows_MODCA.vi it is not coming as i want it.
OK, it is a complete mystery where else you exepct the "10" to appear in the output array. Here's what I get with my code.
We cannot solve a problem unless it is fully defined. Currently it is not!
03-14-2014 02:47 AM
The 10 should appear in a new row (and not with 8,9). This is because, if you take a look at the input array,
10 is not present in the row where 8,9 is.
You can see the required output if you run my code( Find_Overlapping_Rows.vi) with the same array.
Guess my problem can be solved if i use my vi only.... but sadly it is complicated. i thought i would be able to
make something more simple 😞
My apologies that i am still unable to clearly explain the problem statement to you.
let me breakdown the problem with this example.
consider the input array 1 2 3 4 5 6 7
2 3 6 0 0 0 0
3 2 7 0 0 0 0
4 5 0 0 0 0 0
7 1 0 0 0 0 0
8 9 0 0 0 0 0
10 0 0 0 0 0 0
the 2,3,6 in 2nd row is already found in 1st row so delete 2nd row.
the 3,2,7 in 3rd row is already found in 1st row so delete 3rd row.
the 4,5 in 4th row is already found in 1st row so delete 4th row.
the 7,1 in 5th row is already found in 1st row so delete 5th row.
the 8,9 in 6th row is not found in any other rows so retain it.
the 10 in 7th row is not found in any other rows so retain it.
thus the output array must have.
1 2 3 4 5 6 7
8 9 0 0 0 0 0
10 0 0 0 0 0 0
Hope i have cleared it a little bit now.
Thanks for all the help and quick reply 🙂
Regards
Aveo
03-14-2014 02:51 AM - edited 03-14-2014 02:53 AM
OK, now it is clearer. Unfortunately it is 1am here, so I will look tomorrow. I am sure this can still de done with much less code! 🙂
Are these alway small integers? What is the range of values that can occur overall. How long can the rows be?
03-14-2014 03:09 AM - edited 03-14-2014 03:09 AM
03-14-2014 03:58 AM - edited 03-14-2014 04:07 AM
Hi Altenbach, Yes this is what i was looking for! 🙂 The rows will be between 200 or 300 at most.
This works amazingly without complicating the program. Thanks a mighty lot for this. 🙂
Regards
Aveo
03-14-2014 10:09 AM
Yes, then you simply need to increase the lookup array size a little bit. Even if there is no known upper limit for the numbers, the code would not be much more complicated, but we would need to change the code a little bit.
SImple problems always have simple solutions! 😄 Note the use of the "-1". This is to automatically ignore all zeroes.