Bulk concatenation of cell array contents (without looping)?
Ältere Kommentare anzeigen
Hi,
I have a 1x4 cell whose elements are all 1x40 cells. Each of the elements of the 1x40 cells is a 1000x128 array of doubles.
Is there a way to concatenate the contents of the elements in the 1x40 cells into a 40000x128 array of doubles without looping through the elements individually?
Thanks, Alex
Akzeptierte Antwort
Weitere Antworten (2)
Ramis Rafay
am 23 Jul. 2017
0 Stimmen
I think this will work for any given number of elements without looping
stackedarrays = vertcat(mycell{:,:})
1 Kommentar
theblueeyeswhitedragon
am 27 Jun. 2018
Bearbeitet: theblueeyeswhitedragon
am 27 Jun. 2018
This gives you back a mxn matrix, which you could easily obtain by using cell2mat().
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!