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

 Respuesta aceptada

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

2 comentarios

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

Iniciar sesión para comentar.

Categorías

Más información sobre Characters and Strings en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 3 de Oct. de 2014

Comentada:

el 6 de Oct. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by