How to muliply non equal vectors with slicing?
1 次查看(过去 30 天)
显示 更早的评论
A = 1:12;
B = 1:4;
I am looking for a function that performs multiplication as follows:
- Matrix B has 4 elements and matrix A has 12 elements. I want to multiply B with A, in a sequence of multiplying B with A(1:4), and next B with A(5:8), and so on.
- I want to perform this complete operation in one instance with some matlab function or vectorization without any loops involved
Could some one help me in this regard?
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!