Error due to multiple causes in Simulink block diagram

45 views (last 30 days)
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.

Answers (1)

Priyanshu Mishra
Priyanshu Mishra on 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

Categories

Find more on Simulink Functions 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!