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
1 view (last 30 days)
Show older comments
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.
0 Comments
Accepted Answer
Mischa Kim
on 4 Oct 2014
pengcheng, use
P = [pa(1),pa(2),pa(3),pa(4),pa(5)];
H = unique(P);
instead.
2 Comments
Guillaume
on 4 Oct 2014
Or even simpler:
P = pa(1:5);
H = unique(P); % don't need the 'rows' option in any case
More Answers (1)
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!