フィルターのクリア

Remove Duplicates from Cell Array

129 ビュー (過去 30 日間)
Ammar Taha
Ammar Taha 2020 年 11 月 21 日
コメント済み: Ammar Taha 2020 年 11 月 21 日
Hello there, if I have a cell array as following:
in which the first column is constructed of type 'char' for each element, how can I extract this first col. without duplicates?
Thanks in Advance

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 11 月 21 日
You can use unique()
C; % your cell array
country_names = unique(C(:,1))
  1 件のコメント
Ammar Taha
Ammar Taha 2020 年 11 月 21 日
Thanks a lot, I was confused using unique for the first time.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by