필터 지우기
필터 지우기

Changing block row matrix to block column matrix?

조회 수: 3 (최근 30일)
Seyyed Mohammad Saeed Damadi
Seyyed Mohammad Saeed Damadi 2018년 9월 12일
I have a block matrix p = [A B C ...]. I want to change the matrix into a column block matrix without changing the elements of inner matrices (A, B, ...).
  댓글 수: 4
Walter Roberson
Walter Roberson 2018년 9월 12일
Q = P;
P is already what you list as your desired output.
Seyyed Mohammad Saeed Damadi
Seyyed Mohammad Saeed Damadi 2018년 9월 12일
Sorry, I had made a mistake.

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

채택된 답변

Andrei Bobrov
Andrei Bobrov 2018년 9월 12일
편집: Andrei Bobrov 2018년 9월 13일
[EDIT]
B = 2; % the number of blocks
[m,n] = size(c);
out = reshape(permute(reshape(c,m,n/B,[]),[1,3,2]),m*B,[]);
  댓글 수: 4
Andrei Bobrov
Andrei Bobrov 2018년 9월 13일
편집: Andrei Bobrov 2018년 9월 13일
Please see my answer after edit.
Seyyed Mohammad Saeed Damadi
Seyyed Mohammad Saeed Damadi 2018년 9월 13일
It works. Thank you.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Array and Matrix Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by