Multiplication between two matrices with different number of rows

1 view (last 30 days)
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.

Accepted Answer

Stephen23
Stephen23 on 11 Jul 2022
Edited: Stephen23 on 11 Jul 2022
C = permute(A,[1,3,2]) .* reshape(B,1,[])

More Answers (0)

Categories

Find more on Graphics Object Properties in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!