MATLAB: I want to use fonction(unique) to get un string ,but it awlays shows Error using cell/unique?Can anyone tell me what I am doing wrong here? thank you

unique

P={pa(1),pa(2),pa(3),pa(4),pa(5)};
H=unique(P,'rows');
Error using cell/unique (line 95)
Input A must be a cell array of strings.

Best Answer

pengcheng, use
P = [pa(1),pa(2),pa(3),pa(4),pa(5)];
H = unique(P);
instead.