Borrar filtros
Borrar filtros

Changing block row matrix to block column matrix?

3 visualizaciones (últimos 30 días)
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 comentarios
Walter Roberson
Walter Roberson el 12 de Sept. de 2018
Q = P;
P is already what you list as your desired output.
Seyyed Mohammad Saeed Damadi
Seyyed Mohammad Saeed Damadi el 12 de Sept. de 2018
Sorry, I had made a mistake.

Iniciar sesión para comentar.

Respuesta aceptada

Andrei Bobrov
Andrei Bobrov el 12 de Sept. de 2018
Editada: Andrei Bobrov el 13 de Sept. de 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 comentarios
Andrei Bobrov
Andrei Bobrov el 13 de Sept. de 2018
Editada: Andrei Bobrov el 13 de Sept. de 2018
Please see my answer after edit.
Seyyed Mohammad Saeed Damadi
Seyyed Mohammad Saeed Damadi el 13 de Sept. de 2018
It works. Thank you.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Array and Matrix Mathematics en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by