MATLAB Answers

Hide simulink editor while running a model

4 views (last 30 days)
Rostislav Teryaev
Rostislav Teryaev on 24 Apr 2018
Answered: Atul Suri on 4 Jun 2019
I do not understand why it is necessary to open simulink editor when running a model on simulation. Even if FastStart is enabled for not to recompile a model in an iterative simulation. So, the question is whether it is possible or not to run simulation without making simulink editor visible (or at least to hide it after opening)?

  0 Comments

Sign in to comment.

Accepted Answer

Atul Suri
Atul Suri on 4 Jun 2019
You can run the model without opening the model using the sim command. See doc for sim command here. You can also load the model using load_system which will load the model in memory but not open the editor. See Run Simulations Programmatically for more details.
The following will load the Modeling a Fault-Tolerant Fuel Control System example model (sldemo_fuelsys) and simulate it:
model = 'sldemo_fuelsys';
load_system(model);
set_param(model, 'SimulationCommand', 'start')
You can simulate it without opening/loading explicitly using the following:
sim('sldemo_fuelsys')

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.