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 Exchange에서 Creating 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