|On this page…|
Opening a model brings the model into memory and displays the model graphically in the Simulink® Editor.
You can also bring a model into memory without displaying it, as described in Load a Model.
To browse template models, see Create a New Model.
On the Library Browser toolbar, click the Open button.
In the Library Browser or the Simulink Editor, select File > Open. Choose a model or enter the file name of the model.
At the MATLAB® command prompt, enter the name of the model, without the file extension (e.g., .slx) . The model must be in the current folder or on the path.
See also Search for a Model in a File Browser.
Note: If you have an earlier version of the Simulink software, and you want to open a model that was created in a later version, first use the later version to save the model in a format compatible with the earlier version. Then open the model in the earlier version. For details, see Export a Model to a Previous Simulink Version.
You can search for and open models using your operating system file browser. When you select a model .slx or .slxp file in Windows® Explorer or Mac Quick Look, the browser displays properties for the file, such as Authors and Release. Use these properties to search for model files. Use the "Tags" property to add custom searchable text to the file.
Double-click a model file in the file browser to open it.
If you open a model created in a MATLAB software session configured to support one character set encoding (for example, Shift_JIS), in a session configured to support another character encoding (for example, US_ASCII), Simulink displays a warning for SLX files. For MDL files, you might see a warning or an error message, depending on whether it can encode the model, using the current character encoding. The warning or error message specifies the encoding of the current session and the encoding used to create the model. To display the model's text correctly:
Use the slCharacterEncoding command to change the character encoding of the current MATLAB software session to that of the model as specified in the warning message.
You can now edit and save the model.
The first model that you open in a MATLAB session takes longer to open than do subsequent models. This is because MATLAB does not load the Simulink product into memory until the first time that you open a Simulink model. This just-in-time loading of the Simulink product reduces the MATLAB startup time and avoids unnecessary consumption of system memory.
To avoid the initial model opening delay, you can have MATLAB load the Simulink software when the MATLAB product starts up. You can issue the command to load Simulink at MATLAB startup from one of two places:
The -r command line option
The MATLAB startup.m file
Use one of these commands:
load_simulink — loads the Simulink product
simulink — loads the Simulink product and opens the Simulink Library Browser
For example, to load the Simulink product when the MATLAB software starts up on a computer running the Microsoft® Windows operating system, create a desktop shortcut with the following target:
matlabroot\bin\win32\matlab.exe -r load_simulink
Similarly, the following command loads the Simulink software when the MATLAB software starts up on Macintosh and Linux® computers:
matlab -r load_simulink