I have 10 sets (each set includes 1s and 0s: 1 means element selected) and trying to find the unique sets and store its element indices. But when there is only one unique set following code gives error. How can I fix it? Thanks for the help.
[Rw,Cl] = find(unique(FSet,'rows','stable'));UnqFS = accumarray(Rw,Cl,[], @(f) {sort(f).'});celldisp(UnqFS)
Best Answer