Hello
I am attempting to modify someone else's Simulink model. There are constant blocks with constant names as opposed to numbers. For example, rotor RPM input is 'Omega'.
In my experience, this should be defined in the workspace through some appropriate script file. In this model it will run fine without any script file and without any constants defined in the workspace. After the simulation has run no constants appear in the workspace.
Please tell me where the simulink model might be getting these values from! Thanks

 Akzeptierte Antwort

Sebastian Castro
Sebastian Castro am 13 Mai 2015

0 Stimmen

They could be in the Model Workspace, which is a great place to "protect" variables from the MATLAB base workspace.
You can go there by selecting View > Model Explorer, or Ctrl+H on Windows. Once you're there, you can navigate through your open model and find the Model Workspace section. See if those variables are there.
Another way to get the Model Explorer opened up is by right-clicking the model and selecting Find Referenced Variables. That will show you the locations of all variables used by that model, and where they are.
- Sebastian

2 Kommentare

N/A
N/A am 13 Mai 2015
Thanks Sebastian. So simple yet has saved me so much time!
Justin Xuereb
Justin Xuereb am 11 Apr. 2020
I also have a similar problem to romeo but I didnt solve it by Sebastians answer

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Simulink Environment Customization finden Sie in Hilfe-Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by