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.

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

example

Examples

collapse all

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

1. Open the sldvSliceClimateControlExample example model.

open_system('sldvSliceClimateControlExample');

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

obj = slslicer('sldvSliceClimateControlExample');

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

activate(obj);
Consider turning on Fast Restart before launching Model Slicer for simulation based workflows. Do not show again.

4. 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.

5. 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.

Version History

Introduced in R2015b