Matrices in a matrix

1 次查看(过去 30 天)
UGO mela
UGO mela 2017-5-15
编辑: Stephen23 2017-5-15
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
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 个)

John
John 2017-5-15
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

类别

Help CenterFile Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by