MATLAB Answers


how to enter data to a simulink model while it is executing

Asked by Arun Badigannavar on 10 Dec 2012

I am running my simulink models from gui written in script in MATLAB ,Now i want to change some values of simulink model blocks which are user entering while the starting of the simulation,,but now i want to change them whenever user wants them to change,,,for this i should pause the simualtion or how will i allow user to enter his value at any time



1 Answer

Answer by Azzi Abdelmalek
on 10 Dec 2012

If you don't need to change parameters while your model is running, it's better to stop your model. then use set_param function to change your parameters


@TAB went through these tunable parameters ,,,thanks for it,,,

use these commands






If you want to stop simulation use


doc set_param

Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!