フィルターのクリア

Changing block row matrix to block column matrix?

3 ビュー (過去 30 日間)
Seyyed Mohammad Saeed Damadi
Seyyed Mohammad Saeed Damadi 2018 年 9 月 12 日
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 件のコメント
Walter Roberson
Walter Roberson 2018 年 9 月 12 日
Q = P;
P is already what you list as your desired output.
Seyyed Mohammad Saeed Damadi
Seyyed Mohammad Saeed Damadi 2018 年 9 月 12 日
Sorry, I had made a mistake.

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

採用された回答

Andrei Bobrov
Andrei Bobrov 2018 年 9 月 12 日
編集済み: Andrei Bobrov 2018 年 9 月 13 日
[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 件のコメント
Andrei Bobrov
Andrei Bobrov 2018 年 9 月 13 日
編集済み: Andrei Bobrov 2018 年 9 月 13 日
Please see my answer after edit.
Seyyed Mohammad Saeed Damadi
Seyyed Mohammad Saeed Damadi 2018 年 9 月 13 日
It works. Thank you.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeArray and Matrix Mathematics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by