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

 Réponse acceptée

pengcheng, use
P = [pa(1),pa(2),pa(3),pa(4),pa(5)];
H = unique(P);
instead.

2 commentaires

Or even simpler:
P = pa(1:5);
H = unique(P); % don't need the 'rows' option in any case

Connectez-vous pour commenter.

Catégories

En savoir plus sur Characters and Strings dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by