Remove Duplicates from Cell Array

103 次查看(过去 30 天)
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))

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by