Accessing cell arrays within a cell array and merging them together end to end or in the same column/row
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Krispy Scripts
am 9 Dez. 2016
Beantwortet: Guillaume
am 10 Dez. 2016
I have a cell array with 9 cells. Within those cells I have matrices with 7001 x 1 data points. I am trying to merge all the matrices (7001x1 double) so that all them from all the cells are in in one cell row or column, either is fine.
So there are 9 cells within the cell, with a total of 346 matrices divided in these 9 cells. I want all these matrices in a cell array all merged into one column or row.
I attached an exampledata column array. Please let me know if this is not clear.
0 Kommentare
Akzeptierte Antwort
Guillaume
am 10 Dez. 2016
Because the cell arrays in each cell are all row vectors they can only be concatenated horizontally, thus:
[exampledata{:}] %or horzcat(exampledata{:})
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!