Cell to 3D Matrix
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Gerrit Liedtke
am 19 Okt. 2019
Beantwortet: Daniel M
am 19 Okt. 2019
Hi, I've found many similar questions relating the transformation from cell-array to 3D matrix, but none of the solutions worked for me (or I was unable to adapt the solutions for my problem)
I have a (20x1) cell array and each cell contains a 360x900 matrix. Optimally, the new 3D matrix has the dimension 900x20x360 but 360x900x20 would also work for me.
Thanks for your help!
0 Kommentare
Akzeptierte Antwort
Daniel M
am 19 Okt. 2019
mycell = repmat({rand(360,900)},20,1);
% this is what you currently have
mat3D = permute(cat(3,mycell{:}),[2 3 1]);
whos mat3D % [900,20,360]
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Mathematics and Optimization finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!