Confusion of sum of two matrices on SIMULINK
5 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Deep
on 17 Oct 2024
Edited: Deep
on 17 Oct 2024
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 Comments
See Also
Categories
Find more on Sources in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!