Confusion of sum of two matrices on SIMULINK
4 次查看(过去 30 天)
显示 更早的评论
Hi,
I have some problems of sum of two matrices. First element of sum matrix is missing.
t=1:15
k=10:24
My simulink diagram is at the attachment.
First value of sum matrix must be 11, but when i run the my SIMULINK model; this value is not visible.
Where is my mistake of this operation?
Thanks a lot!
0 个评论
回答(1 个)
Deep
2024-10-17
编辑:Deep
2024-10-17
The "From Workspace" block in Simulink expects data in a timeseries format, where the first column is treated as timestamps. This is likely why the first number in your matrix is not appearing in the sum, as it is being interpreted as a timestamp rather than a data value. For more information, you can refer to the documentation for "From Workspace" block: https://www.mathworks.com/help/simulink/slref/fromworkspace.html
To resolve this, use the "Constant" block (https://www.mathworks.com/help/simulink/slref/constant.html) instead, which allows you to input your matrices directly as data without any time-based interpretation.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sources 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!