필터 지우기
필터 지우기

I want to convert 3D (6x4x5 double) data to 2D data

조회 수: 5 (최근 30일)
Bhavnish
Bhavnish 2019년 5월 24일
댓글: Bhavnish 2019년 5월 24일
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
Rik
Rik 2019년 5월 24일
How should this data be reshaped to 2D? There are many ways to do that, which of them do you mean?
Bhavnish
Bhavnish 2019년 5월 24일
편집: Bhavnish 2019년 5월 24일
It will be good if it can be converted into 1xN double format.
When the data will be in the double format, I want to use mat2str function on the same.
For mat2str function the input data must be 2-D matrix.

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

채택된 답변

KSSV
KSSV 2019년 5월 24일
A = rand(2,2,3) ;
out = reshape(permute(A, [2 1 3]), size(A, 2), [])'
  댓글 수: 3
KSSV
KSSV 2019년 5월 24일
Replace A with your specific data.
Bhavnish
Bhavnish 2019년 5월 24일
KSSV, can you please help in converting the same 3-D data to a character string which I have pasted in my original question?
I am trying to see which will fit good for the requirement.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

제품


릴리스

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by