How to partition matrix?

38 visualizaciones (últimos 30 días)
Ammy
Ammy el 8 de Ag. de 2021
Comentada: Ammy el 8 de Ag. de 2021
I have four matrices of same order A,B,C,D
I combined them in one as
E=[A B;C D];
Now how can I get back A,B,C,D with the help of E?

Respuesta aceptada

Walter Roberson
Walter Roberson el 8 de Ag. de 2021
[R,C,~] = size(E);
HR = floor(R/2); HC = floor(C/2);
A = E(1:HR, 1:HC, :);
B = E(1:HR, HC+1:C, :);
C = E(HR+1:R, 1:HC, :);
D = E(HR+1:R, HC+1:C, :);
  1 comentario
Ammy
Ammy el 8 de Ag. de 2021
Thank you very much.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Matrix Decomposition 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