Error due to multiple causes in Simulink block diagram

41 次查看(过去 30 天)
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 个)

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