필터 지우기
필터 지우기

Convert 4D data to 3D

조회 수: 57 (최근 30일)
Riddhi Gala
Riddhi Gala 2018년 4월 23일
댓글: Tina 2021년 11월 14일
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?

채택된 답변

Stephen23
Stephen23 2018년 4월 23일
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
Alex
Alex 2019년 4월 25일
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
Stephen23 2019년 4월 26일
@Alex: where A is your array:
A = permute(A,[1,2,4,3])

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

maria tamoor
maria tamoor 2018년 11월 2일
I have mri data in x,y,slice,frame how can i convert it into 3 d and just get x,y,slice

Abir Troudi
Abir Troudi 2019년 10월 2일
hey, i need to convert 4-D volume MRI to 3-D volume, any help please?
  댓글 수: 1
Tina
Tina 2021년 11월 14일
Use squeeze command

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Biomedical Imaging에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by