Suppose I have the following code
mc = {[2 5],[2 5],[8 9 2],[33 77 4],[102 6],[110 99],[2 5]}
(Identifying uniques in a cell array:Jonas Answer):
%# convert to strings
mcs = cellfun(@(x)(mat2str(x)),mc,'uniformoutput',false);
%# run unique
[uniqueCells,idxOfUnique,idxYouWant] = unique(mcs);
fileName = ['C:\Users\MATLAB\matrice_Result.mat'];
save(fileName,'uniqueCells');
to load the result and use it as a cell, Can I do that ?:
load('C:\Users\MATLAB\matrice_Result.mat');
A = uniqueCells;
B = [5 77 41 66 7];
(Finding the vectors of the cell A that contain at least one element of the vector B: Divakar Answer)
R = A(arrayfun(@(n) any(ismember(B,A{n})),1:numel(A)));
I have the impression that the second code does not recognize A !!!