필터 지우기
필터 지우기

How do I recombine matrices in this order?

조회 수: 1 (최근 30일)
matlabkid602
matlabkid602 2017년 7월 21일
댓글: matlabkid602 2017년 7월 21일
I have nine matrices with equal dimensions of 40x10, how do I recombine them in the way shown in my png?
Thank you

채택된 답변

Guillaume
Guillaume 2017년 7월 21일
If your matrices are not together in a cell array, e.g. they're individually numbered matrices, then
  • don't do that!
  • fix the problem by putting them together in a cell array:
c = {M1, M2, M3, ....}
it is then trivial to reshape/transform that cell array and generate the full matrix you want:
c = reshape(c, 3, 3); %reshape the cell array in a 3x3 grid
c = rot90(c); %rotate 90 degrees anticlockwise
result = cell2mat(c); %concatenate all into one matrix
  댓글 수: 1
matlabkid602
matlabkid602 2017년 7월 21일
Thank you so much, you have saved me a lot of time :)

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by