I solved the problem this way so far:
% Get cell array with non zero values:
rsm=sort(RCX');
[~,J,values]=find(rsm);
u=unique([J,values],'rows');
N=size(u,1);
tmp=diff([0;find(diff(u(:,1)));N]);
out1=mat2cell(u(:,2),tmp);
RCXcell=out1;
clear out1 rsm rsm0 u N tmp
% find complete rows as sequence in other rows
delVec=zeros(size(RCX,1),1);
for i=1:size(RCX,1)
for j=1:size(RCX,1)
Index=strfind(RCX(j,:),RCXcell{i}');
if ~isempty(Index) && j~=i
delVec(i)=1;
end
end
end
k=find(delVec);
RCX(k,:)=[];
It works for my purpose because the fields are not that big, but still not happy using two loops,
Anyway still not found an other more advanced solution. Which could be faster and usable for big fields
Best regards!