How to horizontally merge cells of strings/chars for each row without writing a for-loop?
    6 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    zhehao.nkd
      
 el 21 de Nov. de 2022
  
    
    
    
    
    Comentada: zhehao.nkd
      
 el 21 de Nov. de 2022
            I have some m*n cells of char arrays, and the figure serves as an example for that. Is it possible to horizontally merge char arrays of each rows like 'B659' and 'Z01' to 'B659Z01' without using a for-loop to iterate each row?

0 comentarios
Respuesta aceptada
  Walter Roberson
      
      
 el 21 de Nov. de 2022
        fmt = repmat('%s', 1, size(YourCell,2));
output = compose(fmt, string(YourCell));
Más respuestas (0)
Ver también
Categorías
				Más información sobre Cell Arrays 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!