How to partition matrix?

24 ビュー (過去 30 日間)
Ammy
Ammy 2021 年 8 月 8 日
コメント済み: Ammy 2021 年 8 月 8 日
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?

採用された回答

Walter Roberson
Walter Roberson 2021 年 8 月 8 日
[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 件のコメント
Ammy
Ammy 2021 年 8 月 8 日
Thank you very much.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Decomposition についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by