set_param Command calls OpeningFcn
Mostrar comentarios más antiguos
Hi guys,
I'm programming on a GUI for my simulink model with guide. To set Parameters in a simulink Block and to start the model from gui the appropriate set_param commands are used. But every time a set_param command is executed by matlab the guide OpeningFcn function is called.
Is there a way to avoid this?
3 comentarios
Ryan G
el 10 de Abr. de 2013
What block or parameter are you changing? Could you use a workspace parameter to define it?
Arno
el 11 de Abr. de 2013
Ryan G
el 11 de Abr. de 2013
I'm not seeing this issue with a simple model/GUI. What version are you using? What callback are these currently in? Have you tried doing this with a simple GUI/Model to verify this is the issue?
Respuestas (1)
Babak
el 10 de Abr. de 2013
0 votos
If the GUI is not open, as soon as you call to open it, the OpeningFcn runs. Now its up to you what to put in the Opening Fcn. You can write the OpeningFcn such that the GUI's initialization parameters would be set according to the Simulink model's parameters like for example using the Simulink workspace parameters or model parameters.
Categorías
Más información sobre Model, Block, and Port Callbacks en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!