Convert 4D data to 3D
57 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Riddhi Gala
am 23 Apr. 2018
Kommentiert: Tina
am 14 Nov. 2021
I have a data structure which is 4 dimensional having dimensions of (9,1000,40,6). I have converted it to the following picture
Each of this 6 cells now has 1x40 data which looks as follows,
It goes from 1 to 40 each having 9X1000 size array. How can I convert this data to 40x9x1000?
0 Kommentare
Akzeptierte Antwort
Stephen23
am 23 Apr. 2018
Why not just convert it to the correct shape in the first place?:
A = your 9x1000x40x6 array
C = squeeze(num2cell(permute(A,[3,1,2,4]),1:3))
3 Kommentare
Alex
am 25 Apr. 2019
Hey I have a similar issue. I have a 4-D double (a 188x194x1x182 matirx, which is x,y,depth,time) the depth is 0 for all of them and I need to convert it to a 188x194x182 matrix. How can I do this in a similar way?
Stephen23
am 26 Apr. 2019
@Alex: where A is your array:
A = permute(A,[1,2,4,3])
Weitere Antworten (2)
maria tamoor
am 2 Nov. 2018
I have mri data in x,y,slice,frame how can i convert it into 3 d and just get x,y,slice
0 Kommentare
Siehe auch
Kategorien
Mehr zu Biomedical Imaging 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!