cell array manipulation with string
    1 visualización (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
Write a line of MATLAB code that uses the cell array A to generate the string 'Cal Golden Bears'
A = {'Cal', 'Golden', 'Bears', [5 7], {[1 2 3 4]}}
A = 
      'Cal'    'Golden'    'Bears'    [1x2 double]    {1x1 cell}
The closest I've gotten so far is this, but I still don't have all three words in one string.
A(1:3)
ans = 
      'Cal'    'Golden'    'Bears'
0 comentarios
Respuestas (1)
  Azzi Abdelmalek
      
      
 el 24 de Jul. de 2014
        
      Editada: Azzi Abdelmalek
      
      
 el 24 de Jul. de 2014
  
      [A{1:3}]
%or
strjoin(A(1:3))
1 comentario
Ver también
Categorías
				Más información sobre Matrix Indexing 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!

