Concatenating doubles in cell arrays
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
MiauMiau
el 24 de En. de 2017
Comentada: Stephen23
el 24 de En. de 2017
Hi
I have two cell arrays, each of them 1x25. Each contains a 2x1 double array in the first 24 elements, and a 60x1 double array in the 25. I want to combine the two such that a new cell array would have a format of 1x25 as well, containing a 4x1 double array (concatenating of the original double arrays) in the first 24 elements, and a 120x1 double array in its 25th element - how can I do that? Thanks
0 comentarios
Respuesta aceptada
Stephen23
el 24 de En. de 2017
Editada: Stephen23
el 24 de En. de 2017
Where A and B are the input cell arrays:
cellfun(@(a,b)[a;b],A,B,'UniformOutput',false)
Or even
cellfun(@vertcat,A,B,'UniformOutput',false)
Más respuestas (0)
Ver también
Categorías
Más información sobre Creating and Concatenating Matrices 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!