Products & Services Solutions Academia Support User Community Company

Learn more about Simulink   

Opening a Model

Introduction

Opening a model both brings the model into memory and displays the model graphically. You can also bring a model into memory without displaying it, as described in Loading a Model.

Opening an Existing Model

To open an existing model diagram, either:

Opening Models with Different Character Encodings

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, the Simulink software displays a warning or an error message, depending on whether it can or cannot encode the model, using the current character encoding, respectively. The warning or error message specifies the encoding of the current session and the encoding used to create the model. To avoid corrupting the model (see Saving Models with Different Character Encodings) and ensure correct display of the model's text, you should:

  1. Close all models open in the current session.

  2. 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.

  3. Reopen the model.

You can now safely edit and save the model.

Avoiding Initial Model Open Delay

You may notice that the first model that you open in a MATLAB technical computing environment session takes longer to open than do subsequent models. This is because to reduce its own startup time and to avoid unnecessary consumption of your system's memory, the MATLAB software does not load the Simulink product into memory until the first time you open a Simulink model. You can cause the MATLAB technical computing environment to load the Simulink software when the MATLAB product starts up, and thus avoid the initial model opening delay. This can be done by using either the -r command line option or your MATLAB software startup.m file to run either load_simulink (loads the Simulink product) or 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 UNIX® systems, systems:

matlab -r load_simulink
  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS