Simplify Model for Targeted Analysis of Complex Models Using Model Slicer Tool
You can simplify simulation, debugging, and formal analysis of large, complex models by focusing on areas of interest in your model. After highlighting a portion of your model using the Model Slicer, you can generate a simplified standalone model. The simplified model contains the blocks and dependency paths in the highlighted portion. Apply changes to the simplified standalone model based on simulation, debugging, and formal analysis, and then apply these changes back to the original model.
The example model
sldemo_mdlref_basiccontains three instances of the model
sldemo_mdlref_counter. To open the model, at the MATLAB® command prompt, enter:
To open the Model Slicer Manager, on the Model Verification, Validation, and Test section of the Apps tab, click Model Slicer.
In the Model Slice Manager, click the arrow to expand the Slicer configuration list.
Set the slice properties:
Model Slicer can also highlight the constructs downstream of or bidirectionally from a block in your model, depending on which direction you want to trace the signal propagation.
CounterCas a starting point. In the model, right-click
CounterCand select Model Slicer > Add as Starting Point.
The Model Slicer now highlights the upstream constructs that affect
In the Model Slice Manager, click Generate slice.
In the Select File to Write dialog box, select the save location and enter a model name. The simplified standalone model contains the highlighted model items.
To remove highlighting from the model, close the Model Slice Manager.
You can now analyze the simplified standalone model and apply any changes to the source model.