Multiplying each column with a corresponding row value
6 次查看(过去 30 天)
显示 更早的评论
Hi everyone,
Let's say I have a matrix of 1 x 5, and another matrix of 3 x 5. I want to multiply every element in each column with its corresponding row value, to obtain the following matrix "C"
A= [ 1 2 3 4 5]
B= [1 2 3 4 5, 6 7 8 9 10, 1 1 2 3 1]
C= [1 4 9 16 25; 6 14 24 36 50; 1 2 6 12 5]
My original matrix has many rows that's why it's difficult to do it by hand
How can I do that?
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!