how to convert a 3D array into a n 2D arrays
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hugo
am 23 Feb. 2022
Beantwortet: Kevin Holly
am 23 Feb. 2022
Hi,
I have a 3D array, called A, that is 20*1000*30.
How can I convert the matrix A into 20 2D arrays, with size 1000*30, in which each array represents (i,:,:), where i is the ID of the array.
Best regards,
0 Kommentare
Akzeptierte Antwort
Kevin Holly
am 23 Feb. 2022
A=rand(20,1000,30);
for i = 1:20
B{i} = squeeze(A(i,:,:));
end
B
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!