Filter löschen
Filter löschen

Changing block row matrix to block column matrix?

3 Ansichten (letzte 30 Tage)
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 Kommentare
Walter Roberson
Walter Roberson am 12 Sep. 2018
Q = P;
P is already what you list as your desired output.
Seyyed Mohammad Saeed Damadi
Sorry, I had made a mistake.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Andrei Bobrov
Andrei Bobrov am 12 Sep. 2018
Bearbeitet: Andrei Bobrov am 13 Sep. 2018
[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 Kommentare
Andrei Bobrov
Andrei Bobrov am 13 Sep. 2018
Bearbeitet: Andrei Bobrov am 13 Sep. 2018
Please see my answer after edit.
Seyyed Mohammad Saeed Damadi
It works. Thank you.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by