load_system
R2026bLoad Simulink model into memory
Syntax
Description
loads the model h = load_system(sys)sys into memory and executes preload and load
callbacks defined in the model. After you load a model into memory, you can work
with the model programmatically using Simulink® APIs. To save changes to the model, use the
save_system function.
Note
Security Considerations: Before loading, opening, or simulating a model, consider whether you trust the source or author of the model. Models from untrusted sources might contain callbacks and custom blocks that execute unexpected code when you load, open, or simulate the model. Untrusted sources include those you clone from a remote repository, download, or receive as an archive.
For information about callbacks, see Customize Model Behavior with Callbacks.
Loading a model does not open the model in the Simulink Editor. To
open the model, use the open_system function.