Using Simulink Previous page   Next Page

Creating a Model Reference

To create a reference to a model in another model:

  1. If the model is not on the MATLAB path, add it to the MATLAB path.
  2. Enable the parent model's Inline parameters optimization if it is not already enabled (see Inline parameters).
  3. Create an instance of the Model block in the parent model (for example, by opening the Library Browser and dragging an instance from the Ports & Subsystems block library to the parent model).

  4. Open the newly created Model block's parameter dialog box.

  5. Enter the name of the referenced model in the parameter dialog box's Model name field. The referenced model must be configured to use a fixed-step solver.
  6. Click OK to apply the model name and close the dialog box.

If the referenced model contains any root-level inputs or outputs, Simulink displays corresponding input and output ports on the Model block instance that you have created. Use these ports to connect the reference model to other ports in the parent model.

Opening a Referenced Model

To open a referenced model, select the Model block that references the model. Then select Open Model from the model editor's Edit menu or from the block's context menu.


Previous page  Model Referencing Versus Subsystems Parameterizing Model References Next page

© 1994-2005 The MathWorks, Inc.