Multiplication between two matrices with different number of rows

1 visualizzazione (ultimi 30 giorni)
Dear all,
I have two matrices:
A=[42x5];
B=[32x1];
I want to multiply each row of B to each of A.
Kind help needed. Thank you.

Risposta accettata

Stephen23
Stephen23 il 11 Lug 2022
Modificato: Stephen23 il 11 Lug 2022
C = permute(A,[1,3,2]) .* reshape(B,1,[])

Più risposte (0)

Categorie

Scopri di più su Graphics Object Properties in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by