How to reshape and display 3D patches from a 2D matrix

조회 수: 1 (최근 30일)
Tolentee
Tolentee 2016년 2월 26일
편집: Tolentee 2016년 2월 27일
I have a 2D matrix with it's column as a 3D-patch i.e.
X = 100*27 , the row is the amount of 3D patches (100) while the column is a 3*3*3 (3D patch) which was stretched out into a column.
How can I reshape the column and display the 100 patches in matlab?

채택된 답변

the cyclist
the cyclist 2016년 2월 27일
You can use the reshape command:
xr = reshape(x,100,3,3,3);
This will create a 4-D array.
You might need to specify more info about how you want to display them. Do you have a figure you could post that gives an idea?
  댓글 수: 3
the cyclist
the cyclist 2016년 2월 27일
I'm not an expert in image processing. (There are many people here who are.)
I don't know what the (3,3,3) values represent, and how to make an individual image out of it. (You might want to ask a new question about that, if you don't get much response in this one.)
Tolentee
Tolentee 2016년 2월 27일
편집: Tolentee 2016년 2월 27일
Thanks @the cyclist. Your initial solution answered my question besides the display, so I will accept it as answered.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by