필터 지우기
필터 지우기

multiply each block of a matrix with another matrix

조회 수: 1 (최근 30일)
bidlee devi
bidlee devi 2020년 2월 8일
댓글: bidlee devi 2020년 2월 13일
Suppose we have
Matrix A of size 32*32
Matrix B of size 8*8.
How to multiply each block of 8*8 of A with B?
Thanks for the help! :)

답변 (1개)

David Hill
David Hill 2020년 2월 8일
count=1;
for j=1:4
for k=1:4
out{count}=A((j-1)*8+1:j*8,(k-1)*8+1:k*8)*B;
count=count+1;
end
end
Your output is in a cell array.
  댓글 수: 2
bidlee devi
bidlee devi 2020년 2월 10일
Thank you, David.
bidlee devi
bidlee devi 2020년 2월 13일
If we want the output in a matrix form that is in 32*32, how do we do that?
Thanks.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Operating on Diagonal Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by