Effacer les filtres
Effacer les filtres

multiply each block of a matrix with another matrix

1 vue (au cours des 30 derniers jours)
bidlee devi
bidlee devi le 8 Fév 2020
Commenté : bidlee devi le 13 Fév 2020
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! :)

Réponses (1)

David Hill
David Hill le 8 Fév 2020
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 commentaires
bidlee devi
bidlee devi le 10 Fév 2020
Thank you, David.
bidlee devi
bidlee devi le 13 Fév 2020
If we want the output in a matrix form that is in 32*32, how do we do that?
Thanks.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Operating on Diagonal Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by