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

New to MATLAB?

Can we run simulink by m file when simulink interface is not opened

Asked by Ilkay Meseli

Ilkay Meseli (view profile)

on 7 Mar 2013
Latest activity Answered by Abdullah Tahir

Abdullah Tahir (view profile)

on 13 May 2014

ı want to run a simulink file by m file .So, ı use 'sim' command.

but when ı use it , simulink interface is opened.

Can we run simulink by m file when simulink interface is not opened

0 Comments

Ilkay Meseli

Ilkay Meseli (view profile)

Products

3 Answers

Answer by Teja Muppirala

Teja Muppirala (view profile)

on 7 Mar 2013
Accepted answer

Yes, you can use the LOAD_SYSTEM command to load the model into memory without bringing up the Simulink interface, for example:

>>  model = 'sldemo_househeat';
>>  load_system(model)
>>  sim(model)

1 Comment

Ilkay Meseli

Ilkay Meseli (view profile)

on 7 Mar 2013

thanks teja...=)

Teja Muppirala

Teja Muppirala (view profile)

Answer by Azzi Abdelmalek

Azzi Abdelmalek (view profile)

on 7 Mar 2013
Edited by Azzi Abdelmalek

Azzi Abdelmalek (view profile)

on 7 Mar 2013

Yes you can do it, without even loading or opening your model

1 Comment

Teja Muppirala

Teja Muppirala (view profile)

on 7 Mar 2013

Hey, yeah, you're right, SIM automatically loads it. I didn't know that before.

Azzi Abdelmalek

Azzi Abdelmalek (view profile)

Answer by Abdullah Tahir

Abdullah Tahir (view profile)

on 13 May 2014

Can you please tell how to pause and resume the Matlab simulation from script file?

0 Comments

Abdullah Tahir

Abdullah Tahir (view profile)

Contact us