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!