フィルターのクリア

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 Center および File ExchangeOperating on Diagonal Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by