Error due to multiple causes in Simulink block diagram

44 Ansichten (letzte 30 Tage)
Linee Teh
Linee Teh am 22 Apr. 2020
Beantwortet: Priyanshu Mishra am 27 Apr. 2020
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 Kommentar
Ameer Hamza
Ameer Hamza am 24 Apr. 2020
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.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Priyanshu Mishra
Priyanshu Mishra am 27 Apr. 2020
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

Kategorien

Mehr zu Simulink Functions finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by