Effacer les filtres
Effacer les filtres

Please help me how to describe a matrix in terms of smaller matrices.

4 vues (au cours des 30 derniers jours)
For example,
Let A=[1 2 3; 4 5 6; 7 8 9 ] and
A11 = [ 1 2; 4 5] , A12 = [ 2 3 ; 5 6] , A21 = [ 4 5 ; 7 8], A22 = [ 5 6; 8 9]. So I wanted to express A in terms of A11, A12, A21, and A22.

Réponse acceptée

Michael Haderlein
Michael Haderlein le 28 Mai 2015
Is it sure they overlap by one line/column? Then it's just
A=[A11 A12(:,2:end);A21(2:end,:) A22(2:end,2:end)];
  2 commentaires
Temesgen Gelaw
Temesgen Gelaw le 28 Mai 2015
yes. each adjacent matrices has 2 points in common.
Thank you !
Temesgen Gelaw
Temesgen Gelaw le 28 Mai 2015
Dear Michael I applied your method for A= 9x9 matrix as follows
A=[ A11(1:2,1:2) A12(1:2,2:3) A13(1:2,3:4) A14(1:2,4:5) A15(1:2,5:6) A16(1:2,6:7) A17(1:2,7:8) A18(1:2,8:end);
A21(2:3,1:2) A22(2:3,2:3) A23(2:3,3:4) A24(2:3,4:5) A25(2:3,5:6) A26(2:3,6:7) A27(2:3,7:8) A28(2:3,8:end);
A31(3:4,1:2) A32(3:4,2:3) A33(3:4,3:4) A34(3:4,4:5) A35(3:4,5:6) A36(3:4,6:7) A37(3:4,7:8) A38(3:4,8:end);
A41(4:5,1:2) A42(4:5,2:3) A43(4:5,3:4) A44(4:5,4:5) A45(4:5,5:6) A46(4:5,6:7) A47(4:5,7:8) A48(4:5,8:end);
A51(5:6,1:2) A52(5:6,2:3) A53(5:6,3:4) A54(5:6,4:5) A55(5:6,5:6) A56(5:6,6:7) A57(5:6,7:8) A58(5:6,8:end);
A61(6:7,1:2) A62(6:7,2:3) A63(6:7,3:4) A64(6:7,4:5) A65(6:7,5:6) A66(6:7,6:7) A67(6:7,7:8) A68(6:7,8:end);
A71(7:8,1:2) A72(7:8,2:3) A73(7:8,3:4) A74(7:8,4:5) A75(7:8,5:6) A76(7:8,6:7) A77(7:8,7:8) A78(7:8,8:end);
A81(8:end,1:2) A82(8:end,2:3) A83(8:end,3:4) A84(8:end,4:5) A85(8:end,5:6) A86(8:end,6:7) A87(8:end,7:8) A88(8:end,8:end)]
but not working. where is my mistake? Please show me !
Thank you Mr. Michael !

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur NaNs dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by