MATLAB Answers

How do you pass a variable from a GUI into a simulink model workspace variable?

14 views (last 30 days)
Adam Kopach
Adam Kopach on 30 Apr 2018
Answered: Prajit T R on 3 May 2018
I have a variable "A" in my model workspace in simulink. I am trying to make a GUI that uses a slider that will adjust the variable in the workspace. I can't seem to figure out how to pass the value into the simulink workspace. Any help is appreciated.

  1 Comment

Ameer Hamza
Ameer Hamza on 30 Apr 2018
Although not directly an answer to your question, have you considered using <https://www.mathworks.com/help/simulink/ug/tune-and-visualize-your-model-with-dashboard-blocks.html Dashboard elements in Simulink. It provides all types of UI elements, which can easily interface with Simulink blocks and change simulation parameters in runtime.

Sign in to comment.

Sign in to answer this question.

Tags