How to multiply row and column vectors in Simulink
4 次查看(过去 30 天)
显示 更早的评论
I would like to multiply a row and a column vector using Simulink.
Example in MATLAB:
a = [11 12 13 14 15];
b = [1;2;3];
c=a.*b
I could not perform this simple operation using Simulink block:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1120135/image.png)
What am I doing wrong, how can I make row-column vector multiplication via Simulink?
Thank you in advance!
0 个评论
回答(1 个)
Mark McBroom
2022-9-10
Your MATLAB code takes advantage of implicit expansion. This feature is not available in Simulink. You'll need to update your model to convert the vectors to matrices with compatible sizes.
0 个评论
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!