Concatenate together two cell arrays

Hello,
I have two 102 x 1 cell (respectively CC and DD), each of them with all 32 x 4 doubles.
I would like to create another cell BB (102 x 1) that includes all the elements of the cell CC and DD, I mean it should contain 64 x 4 doubles (the first part 32 x 2 from CC and the second part 32 x 2 from DD).
How can I do it?
Thanks

 Respuesta aceptada

Walter Roberson
Walter Roberson el 2 de Jul. de 2022
BB = cellfun(@(c,d) [c;d], CC, DD, 'uniform', 0);

3 comentarios

Fabio Taccaliti
Fabio Taccaliti el 2 de Jul. de 2022
Thanks for the reply! this is what I was looking for
What about if now I want to convert it to an array where all the 102 64 x 4 doubles are one after the other in a unique array (7680x4)?
Walter Roberson
Walter Roberson el 2 de Jul. de 2022
cell2mat(BB)
Fabio Taccaliti
Fabio Taccaliti el 3 de Jul. de 2022
thankss

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Productos

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by