| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink |
| Contents | Index |
| Learn more about Simulink |
You can convert any atomic subsystem to a referenced model. The conversion requires the model containing the subsystem to have the following configuration parameter settings:
Configuration Parameters > Optimization > Inline parameters must be On.
Configuration Parameters > Diagnostics > Data Validity > Signal resolution must be Explicit only.
Configuration Parameters > Diagnostics > Connectivity > Mux blocks used to create bus signals must be Error.
After specifying the indicated parameter values, select Convert to Model Block from the subsystem's context menu. Simulink saves the contents of the subsystem as a new model, then creates and opens an untitled model that contains a Model block whose referenced model is the new model.
Simulink automatically provides a model name that is based on the block name and is unique in the MATLAB path. This name always contains fewer than 60 characters. If an error occurs during the conversion, the outcome depends on the error:
For some errors, a message box appears that gives you the choice of cancelling or continuing.
If continuing is impossible, Simulink cancels the conversion without offering a choice to continue.
Even if conversion is successful, you may still need to reconfigure the resulting model to meet your requirements. For example, the Interpolate data parameter of each root input port in the new model is selected by default. You can clear the parameter wherever this default is not appropriate. See the Inport block documentation for information about Interpolate data.
Once you have successfully created a Model block and referenced model from a subsystem, you can delete the subsystem block from the source model and copy the Model block to the deleted subsystem block's location. All signals will automatically reconnect. The source model is now a parent model that contains the referenced model.
You can use Simulink.SubSystem.convertToModelReference to convert subsystems to model references programmatically. The function provides more capabilities than Convert to Model Block, such as the ability to replace a subsystem with an equivalent Model block in a single operation.
![]() | Creating a Model Reference | Referenced Model Simulation Modes | ![]() |

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 |