getting data from workspace to Simulink

8 Ansichten (letzte 30 Tage)
guo qing
guo qing am 25 Feb. 2024
Kommentiert: Walter Roberson am 25 Feb. 2024
I want to input an array x=[1 2 3 4 5 6] from the workspace into Simulink using the From Workspace block. However, the block only displays five dimensions, and I understand that one of the dimensions is reserved for the time sequence. Do I need to define the time vector for this block, or can I input the data without defining a specific time sequence? Thank you very much

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 25 Feb. 2024
If you insist on using a From Workspace block, then you need to insert a leading 0 into the vector to act as the time coordinate.
  2 Kommentare
guo qing
guo qing am 25 Feb. 2024
Thank you
Walter Roberson
Walter Roberson am 25 Feb. 2024
You should consider instead the possibility of using a Constant block https://www.mathworks.com/help/simulink/slref/constant.html and specifying the name of the variable (in the base workspace) as the value of the Constant Value parameter.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Modeling 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