How to group/filter same values from different matrixes and their columns?

4 views (last 30 days)
I have 4 different matrixes (in size) which are quite large (amount of columns between 50-100 and amount of rows 800-8000).
Every column in every matrix represents a group. The values saved below (in its rows) represent the groups members. This amount of members varies between 5 and 8000. The member values only appear once per matrix.
For example: Matrix 1 has a group (in e.g. column 32) with the members:
[23;41;5434;423;12;45;346]
and matrix 2 has a group (in e.g. column 89) with following members:
[44;25235;432;423;346].
One can see that both groups have the same members 423 and 346. It seems like these two values always are in the same group (though I would have to check matrix 3 and 4 if this really is the case).
I would like to this kind of "filtering" for all groups and save the same kind of group- so that I minimize my amount of collected data.
Any hints/ tips how to start this?

Accepted Answer

Sean de Wolski
Sean de Wolski on 19 Apr 2013
I'm still not totally clear on what you expect. But you might be interested in these:
It's still not clear to me how you wish to define rows etc. A full example of inputs, expected outputs and reasonin with three small (3x2 or 3x3 matrices) would go a long way

More Answers (2)

Jonas
Jonas on 19 Apr 2013
Thanks :) - and I will try to clarify: These are two matrixes (though they actually are much larger..):
[31 1 42 [14 44
2 145 231 31 829
38 992 112 999 1
22 223 990 18239 12
112 12 89 12873 299
44 87 241 744 0 ]
299 621 0
0 802 0 ]
A zero means, that the place is empty. In matrix 1, group 1s values are defined in column 1. Group 2 in column 2 and so on. Matrix 2 also has a group 1 and group 2. One can see that group 1 has the same member, value 31 in matrix 1 and 2s group 1. However, group 1 in matrix 1 and group 2 in matrix 2 have the values 44 and 299 in column. If there would be more I would like to know if they always stick together. One can see in this example, that 31,44 and 299 do not always stick together...
I will have a look at your link later thanks :)

Jonas
Jonas on 10 May 2013
If somebody would need an answer. Simply the function intersect helped :)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!