INTERSECTALL
Given set of sets, produce all possible intersections for each set or all sets at once.
Author: Mehmet Suzen

@Alle Meije,

Thanks for the feedback. I have added one more utility, called INTERSECTALLSET. It does what you need. Also, I've updated the description, hoping that now it is clear what INTERSECTALL produces.

09 Nov 2012

INTERSECTALL
Given set of sets, produce all possible intersections for each set or all sets at once.
Author: Mehmet Suzen

Just uploaded a new version with the following example, hope it helps:

Hi! Just a comment: If you want a weighted histogram in more than one dimension, you can use the submission histcn in file exchange. Just use the option histcn(...,'AccumData', weights); The result will not be 100% the same as the one obtained with this function, since the bin edges are calculated differently.

Thanks for the feedback. I have added one more utility, called INTERSECTALLSET. It does what you need. Also, I've updated the description, hoping that now it is clear what INTERSECTALL produces.

28 Aug 2013

INTERSECTALL
Given set of sets, produce all possible intersections for each set or all sets at once.
Author: Mehmet Suzen

what I expect to find in the intersection of these 3 maps are the indices that are in all sets, i.e.
[3 6 7]. Is it possible to get that with your code?

09 Nov 2012

INTERSECTALL
Given set of sets, produce all possible intersections for each set or all sets at once.
Author: Mehmet Suzen

Hi! Just a comment: If you want a weighted histogram in more than one dimension, you can use the submission histcn in file exchange. Just use the option histcn(...,'AccumData', weights); The result will not be 100% the same as the one obtained with this function, since the bin edges are calculated differently.

@Alle Meije,
Thanks for the feedback. I have added one more utility, called INTERSECTALLSET. It does what you need. Also, I've updated the description, hoping that now it is clear what INTERSECTALL produces.

Comment only

28 Aug 2013

INTERSECTALL
Given set of sets, produce all possible intersections for each set or all sets at once.

Hi, thanks for this - but I don't understand your example.
I have a number of indices found in different maps say:
ind{1} = [ 1 3 4 5 6 7 9 ];
ind{2} = [ 1 2 3 6 7 8 9 ];
ind{3} = [ 2 3 4 5 6 7 8 ];
what I expect to find in the intersection of these 3 maps are the indices that are in all sets, i.e.
[3 6 7]. Is it possible to get that with your code?

Comment only

09 Nov 2012

INTERSECTALL
Given set of sets, produce all possible intersections for each set or all sets at once.

Just uploaded a new version with the following example, hope it helps:
vecSets = {[11, 12, 22, 14], [11, 15, 17, 22, 33], [ 17, 25, 14] }
[indexSet, numAllintersect] = intersectAll(vecSets);
indexSet{1}
ans =
1 3 4
indexSet{2}
ans =
1 3 4
indexSet{3}
ans =
1 3
numAllintersect
3
3
2

Comment only