Matrices in a matrix
조회 수: 1 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
채택된 답변
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
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
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!