I want to convert 3D (6x4x5 double) data to 2D data
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
abc(:,:,1) = [12.267 15.474 14.853 12.596;...
3.363 5.757 6.203 6.179;...
2.050 2.905 3.046 3.190;...
1.643 2.343 2.487 2.572;...
1.544 2.166 2.225 2.221;...
1.504 2.046 2.012 1.971];
abc(:,:,2) = [11.952 15.429 14.815 12.543;...
3.048 5.712 6.164 6.125;...
1.735 2.860 3.008 3.137;...
1.328 2.298 2.449 2.519;...
1.229 2.120 2.187 2.168;...
1.189 2.001 1.973 1.918];
abc(:,:,3) = [12.396 15.777 15.032 12.734;...
3.492 6.060 6.381 6.317;...
2.178 3.208 3.225 3.329;...
1.771 2.646 2.666 2.711;...
1.673 2.469 2.404 2.360;...
1.632 2.349 2.190 2.110];
abc(:,:,4) = [13.192 16.259 15.481 13.098;...
4.288 6.542 6.831 6.681;...
2.975 3.690 3.674 3.693;...
2.567 3.128 3.115 3.075;...
2.469 2.951 2.853 2.724;...
2.428 2.831 2.639 2.474];
abc(:,:,5)= [13.819 16.658 15.806 13.352;...
4.915 6.942 7.156 6.935;...
3.602 4.090 3.999 3.947;...
3.195 3.527 3.440 3.329;...
3.096 3.350 3.178 2.978;...
3.056 3.230 2.965 2.728];
2 Kommentare
Rik
am 24 Mai 2019
How should this data be reshaped to 2D? There are many ways to do that, which of them do you mean?
Akzeptierte Antwort
KSSV
am 24 Mai 2019
A = rand(2,2,3) ;
out = reshape(permute(A, [2 1 3]), size(A, 2), [])'
3 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Type Conversion 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!