This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Refactor Models

Identify modeling clones and patterns to transform model

Use the Model Transformer and Identify Modeling Clones tools to refactor a model to improve model componentization and readability and enable reuse.

Identify modeling patterns that qualify for transformation into Variant Source or Variant Subsystem blocks. Create a model that transforms modeling patterns into Variant Source or Variant Subsystem blocks. Using Variant Subsystem and Variant Source blocks helps in the reusability of a model for different conditional expressions called variant choices. The active model is a combination of a fixed structure and variable components that you activate depending on the variant choice that you select.

Identify data store blocks that qualify for elimination. Eliminating data store blocks improves model readability by making data dependency explicit.

Identify clones and create a model that replaces these clones with links to subsystem blocks in a library. Replacing clones with links to library blocks enables component reuse.


mdltransformerOpen Model Transformer
clonedetectionOpen Identify Modeling Clones tool


Transform Model to Variant System

Use the Model Transformer tool to transform a model into a variant system.

Improve Model Readability by Eliminating Local Data Store Blocks

Use the Model Transformer tool to make data dependency explicit in a model by replacing data store blocks with either a direct signal line, a Delay block or a Merge block.

Enable Component Reuse by Using Clone Detection

Use the Identifying Modeling Clones tool to replace subsystem clones with library blocks.