MATLAB: How to create a GUI in MATLAB to help me tune parameters of the Simulation

affectguiguideparameterssimulinktunabletune

How can I create a GUI in MATLAB to help me tune parameters of my Simulation?
I understand you can create a GUI through which you can set parameters of a Simulink model and then run that model. Is there a way to tune the parameters through a GUI while the Simulink model is running? Do you have any examples?

Best Answer

We have an example of using a GUI to change Simulink parameters while the simulation is running. This demo will only work on MATLAB 6.5 or later. To view this demo, download the attached files and place them on your MATLAB path or in your current working directory.
Then, type the following MATLAB commands
atest % opens the atest model
Gui2Sim % opens the Gui2Sim GUI
Start the model running. You can change the gain value in the simulation by entering numbers in the edit field of the GUI and observe the results on the scope.
Note that you will be unable to modify some parameters while the simulation is running. For more information, see the following URL: