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
    7 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    pengcheng
 el 3 de Oct. de 2014
  
    
    
    
    
    Comentada: pengcheng
 el 6 de Oct. de 2014
            P={pa(1),pa(2),pa(3),pa(4),pa(5)};
H=unique(P,'rows');
Error using cell/unique (line 95)
Input A must be a cell array of strings.
0 comentarios
Respuesta aceptada
  Mischa Kim
    
      
 el 4 de Oct. de 2014
        pengcheng, use
 P = [pa(1),pa(2),pa(3),pa(4),pa(5)]; 
 H = unique(P);
instead.
2 comentarios
  Guillaume
      
      
 el 4 de Oct. de 2014
				Or even simpler:
 P = pa(1:5);
 H = unique(P); % don't need the 'rows' option in any case
Más respuestas (1)
Ver también
Categorías
				Más información sobre Characters and Strings en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

