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.

採用された回答

Mischa Kim
Mischa Kim 2014 年 10 月 4 日
pengcheng, use
P = [pa(1),pa(2),pa(3),pa(4),pa(5)];
H = unique(P);
instead.
  2 件のコメント
Guillaume
Guillaume 2014 年 10 月 4 日
Or even simpler:
P = pa(1:5);
H = unique(P); % don't need the 'rows' option in any case

サインインしてコメントする。

その他の回答 (1 件)

pengcheng
pengcheng 2014 年 10 月 6 日
thank you very much

カテゴリ

Help Center および File ExchangeLarge Files and Big Data についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by