Main Content

Reference Existing Models

A model becomes a referenced model when a Model block in another model references it. Any model can function as a referenced model, and can continue to function as a separate model.

For a video explaining how to create model references, see Getting Started with Model Referencing.

To reference an existing model in another model, follow these steps.

  1. If the folder containing the model you want to reference is not on the MATLAB® path, add the folder to the MATLAB path.

  2. In the referenced model, set Total number of instances allowed per top model to:

    • One to use the model at most once in a model hierarchy.

    • Multiple to use the model more than once in a model hierarchy. To reduce overhead, specify Multiple only when necessary.

    • Zero to preclude referencing the model.

  3. Create an instance of the Model block in the parent model. The new block is initially unresolved because it does not specify a referenced model.

  4. To open the Block Parameters dialog box, double-click the unresolved Model block.

  5. Enter the name of the referenced model in the Model name field. This name must contain fewer than 60 characters, exclusive of the file extension.

  6. Click OK. If the referenced model contains root-level inputs or outputs, the Model block displays corresponding input and output ports.

  7. Use the Model block ports to connect referenced model signals to ports in the parent model. See Model Reference Interface and Boundary.


When a Model block references another model, double-clicking the Model block opens the referenced model. To open the Block Parameters dialog box for a Model block, select the Model block. In the Simulink® Toolstrip, on the Model Block tab, click Block Parameters.

See Also


Related Topics

External Websites