Main Content

slslicer

Create API object for invoking Model Slicer

Description

slslicer(model) creates a Model Slicer configuration object for the model model by exposing the methods for invoking Model Slicer.

slslicer(model,opts) creates a Model Slicer configuration object for the model model by using the options object opts, as defined by slsliceroptions.

example

obj = slslicer(model) creates a Model Slicer configuration object. You can apply the methods on the Model Slicer object obj.

Examples

collapse all

Add a new starting point to the active Model Slicer configuration, and then highlight the model.

Open the sldvSliceClimateControlExample example model.

addpath(fullfile(docroot,'toolbox','simulink','examples'));
open_system('sldvSliceClimateControlExample');

Create a Model Slicer configuration object for the model by using slslicer.

obj = slslicer('sldvSliceClimateControlExample');

Activate the slice highlighting mode of Model Slicer to compile the model and prepare the model slice for dependency analysis.

activate(obj);

Add the Out1 outport block as the starting point and highlight the model slice.

addStartingPoint(obj,'sldvSliceClimateControlExample/Out1');
highlight(obj);

The area of the model upstream of the starting point and which is active during simulation is highlighted.

Terminate the model highlighting mode and discard the analysis data.

terminate(obj);

Input Arguments

collapse all

Name of the model whose Model Slicer options object you configure. slslicer uses the Model Slicer configurations associated with model, as defined by slsliceroptions.

Structure containing the options for the Model Slicer configuration. slsliceroptions defines the options object opts.

Output Arguments

collapse all

Model Slicer object handle.

Introduced in R2015b