Error due to multiple causes in Simulink block diagram

조회 수: 45 (최근 30일)
Linee Teh
Linee Teh 2020년 4월 22일
답변: Priyanshu Mishra 2020년 4월 27일
I am facing error while computing the maltab coding in my state-space simulink block diagram.
The error is:
Error using to_mathwork (line 43)
Error due to multiple causes.
Caused by:
Error using to_mathwork (line 43)
Unsupported input format for From Workspace block 'LQR_v2/Gain'. Available formats are double
non-complex matrix, a structure with or without time, or a structure with MATLAB timeseries
as leaf nodes. All formats require the data to be finite (not Inf or NaN).
Error using to_mathwork (line 43)
Unsupported input format for From Workspace block 'LQR_v2/Input matrix'. Available formats
are double non-complex matrix, a structure with or without time, or a structure with MATLAB
timeseries as leaf nodes. All formats require the data to be finite (not Inf or NaN).
The Gain and Input matrix blocks are time varying, I need to make sure that the system compute every Input matrix and Gain values at the specific time. For example, when time, t = 1s, the values of Input matrix and Gain should be on t = 1s. The matlab and simulink file are attached together.
I hope my clarification is clear and really thanks for the help.
  댓글 수: 1
Ameer Hamza
Ameer Hamza 2020년 4월 24일
It appears that this question is similar to one I answered here: https://www.mathworks.com/matlabcentral/answers/520162-how-to-insert-a-time-varying-matrix-in-simulink? If this issue is resolved, then please close or delete this question.

댓글을 달려면 로그인하십시오.

답변 (1개)

Priyanshu Mishra
Priyanshu Mishra 2020년 4월 27일
Hi Linee,
The error is due to the "From worksapce" block, which you are using in your model. The first collumn of your data (which you are importing) should be time vector.
For more information on this, you may refer to following documentaion

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by