multiply matrices with different dimensions with loop
2 ビュー (過去 30 日間)
古いコメントを表示
Hello, I have two matrices A of [1532x84] and B of [84x1], and I have to multiply them to obtain a matrix C of [1532x84]. How can I create a loop where to multiply each row of A by column of B with Matlab?
0 件のコメント
回答 (1 件)
James Tursa
2020 年 12 月 2 日
Is this what you want?
C = A .* B.';
2 件のコメント
John D'Errico
2020 年 12 月 2 日
Silly. You were supposed to use a loop. :)
for ind = 1:1
C = A .* B.';
end
Sorry. I had to say it.
参考
カテゴリ
Help Center および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!