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 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Mischa Kim
2014-10-4
pengcheng, use
P = [pa(1),pa(2),pa(3),pa(4),pa(5)];
H = unique(P);
instead.
2 个评论
Guillaume
2014-10-4
Or even simpler:
P = pa(1:5);
H = unique(P); % don't need the 'rows' option in any case
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!