Hide simulink editor while running a model

조회 수: 5 (최근 30일)
Rostislav Teryaev
Rostislav Teryaev 2018년 4월 24일
답변: Atul Suri 2019년 6월 4일
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)?

채택된 답변

Atul Suri
Atul Suri 2019년 6월 4일
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개)

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by