Eliminating duplicated values in a cell Array
Afficher commentaires plus anciens
My cel Array looks as such:
S = {'ABS' ; 'First'; 'input'; 'ABS'}
it is a column array instead of a row. I want to eliminate any and all duplicate values in the cell array. I tried the unique function with and without cell2mat and I am getting an error both ways. What is the best way I can go about eliminating duplicate values in my cell array?
Réponses (1)
KALYAN ACHARJYA
le 4 Mar 2020
Modifié(e) : KALYAN ACHARJYA
le 4 Mar 2020
S = {'ABS' ; 'First'; 'input'; 'ABS'};
result=unique(S)
result
result =
3×1 cell array
'ABS'
'First'
'input'
5 commentaires
Deon Hargrove
le 4 Mar 2020
KALYAN ACHARJYA
le 4 Mar 2020
Can you share the code screenshot and error message?
Deon Hargrove
le 4 Mar 2020
Stephen23
le 4 Mar 2020
Deon Hargrove
le 4 Mar 2020
Catégories
En savoir plus sur String dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!