APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

EJS and Simulink post and replies

Return to the EJS and Simulink thread
Login to post to this thread

EJS and Simulink
Manuel M.
6 Posts

Hello everyone,

I'm trying to run a Simulink model EJS and it is working very well, but my problem is that when EJS is opening the Simulink model , a Simulink console is opened, displaying the model information. I would like to know if I cannot do that this window will not display, and if not, how I could close this window from EJS when the execution is completed.

Many thanks and best regards,

Replies to EJS and Simulink

Re: EJS and Simulink -
Francisco Esquembre
228 Posts


Try adding this to the model:


Hope this helps.


Re: Re: EJS and Simulink -
Manuel M.
6 Posts

Hi Paco, many thanks for your help.

I'm trying to use your advice but I don't know how do it. I have a simulink model called Model.mdl and I don't know where I have to write the command "set_param(gcs, 'Open', 'Off')".

I'm doing the following steps from EJS:
1.- externalApp = new SimulinkExternalApp("MODEL.mdl");
2.- externalApp.setClient(this);
3.- externalApp.linkVariables(,,,,,);
4.- externalApp.connect();

But with this settings I can't hide the matlab command windows, and I don't know if there is other form to execute the model to hide this window.

Thanks again for your support and best regards.

OSP Projects:
Open Source Physics - EJS Modeling
Physlet Physics
Physlet Quantum Physics
STP Book