loadSystem
R2026bClass: sltest.TestCase
Namespace: sltest
Load model for MATLAB-based Simulink test
Syntax
Description
[
loads the specified model and returns the name of the model, the model handle, and the
path to the model. modelname,modelhandle,modelpath] = loadSystem(testCase,model)
loadSystem loads a Simulink® model within the scope of a single TestCase method class.
The lifecycle of the model is tied to the test case. When the test case goes out of scope,
the testing framework closes the model without saving
any changes to the model and clears
any base workspace variables loaded by the model.
Previously loaded models remain loaded. Variable values of previously loaded models might
be overridden if, for example, the model being opened has model callbacks. To retain the
variable values of opened models, add PreservingBaseWorkspace as an
input Name-Value argument.
[
loads the model and test case with additional options specified by one or more
modelname,modelhandle,modelpath] = loadSystem(___,Name=Value)Name=Value arguments.
Input Arguments
Name-Value Arguments
Output Arguments
Examples
Version History
Introduced in R2020b