Confusion of sum of two matrices on SIMULINK

조회 수: 3 (최근 30일)
MB Mathematics MB Mathematics
MB Mathematics MB Mathematics 2019년 1월 29일
편집: Deep 2024년 10월 17일
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!

답변 (1개)

Deep
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.

카테고리

Help CenterFile Exchange에서 Sources에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by