I have this matrix in which there are 9 different matrices each one is composed by 6 * 6 elements
I want pre and post multiply each matrix-elements in this way:
A is a matrix with the same size of R
P.S. : I have store R and A as a sparse matrices
How can I do?
Thanks

 採用された回答

David Goodmanson
David Goodmanson 2017 年 5 月 15 日
編集済み: David Goodmanson 2017 年 5 月 15 日

0 投票

Hi UGO, should your top row read R11, R12, R13? at any rate, try
z = zeros(size(A));
C = [A z z;z A z;z z A];
B = C.'*R*C
where C is a block diagonal matrix.

1 件のコメント

UGO mela
UGO mela 2017 年 5 月 15 日
編集済み: Stephen23 2017 年 5 月 15 日
It works perfectly!
Thanks!

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

その他の回答 (1 件)

John
John 2017 年 5 月 15 日

0 投票

try
% if A is 6x6
A = rand(6);
A = repmat(A,3);
% if R is 18x18, constructed from multiple 6x6 sub Rij matrices
B = A'*R*A

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

質問済み:

2017 年 5 月 15 日

編集済み:

2017 年 5 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by