MATLAB: If statement between cells arrays

cells array

I need to compare between values in cells arrays such as I have :
p =
'GO:0008150'
'GO:0016740'
'GO:0016787'
'GO:0008150'
'GO:0016740'
'GO:0016740'
'GO:0016787'
'GO:0016787'
'GO:0016787'
'GO:0006810'
'GO:0006412'
'GO:0004672'
'GO:0008150'
'GO:0008150'
'GO:0006810'
'GO:0016192'
'GO:0006810'
'GO:0005215'
and c:
c =
'GO:0016740'
'GO:0016787'
'GO:0006810'
'GO:0006412'
'GO:0004672'
'GO:0016779'
'GO:0004386'
'GO:0003774'
'GO:0016298'
'GO:0016192'
'GO:0005215'
'GO:0030533'
'GO:0016787'
'GO:0006810'
'GO:0006412'
'GO:0003774'
'GO:0005215'
'GO:0030533'
so I want to make if statement that: I want elements from vector 'p' not occure in vector 'c' . the code I made is:
for i=1:length(p)
if p(i)~=c(:)
level1_root=p{i}
break
else
%disp('There is no root node in the system!!')
end
end
and the error message is: ??? Undefined function or method 'ne' for input arguments of type 'cell'
it is worked for normal vector , but not worked for cells array (my case)
advice please

Best Answer

out=unique(p(cellfun(@(x) ~ismember(x,c),p)))