MATLAB: How to import a data to constant block that into the different simulink model

matlab gui

I have a simulink model that its name is gui. And I want to send two data from gui to simulink model'S constant block. How can I do this?

Best Answer

You should use set_param command as follows:
set_param('gui/Constant','Value','i')
set_param('gui/Constant1','Value','j')
Related Question