Main Content

slsliceroptions

R2026b

Create options object for configuring Model Slicer

Description

slsliceroptions creates an options object for configuring the Model Slicer.

example

slsliceroptions(model) creates a copy of the Model Slicer options object associated with model.

example

slsliceroptions(file) creates a copy of the Model Slicer options object contained in the SLMS file file.

slsliceroptions(model,opts) attaches the slicer options opts to the model model by overwriting the existing options.

slsliceroptions(file,opts) attaches the slicer options opts to the SLMS file file by overwriting the existing options.

Examples

collapse all

Add a new starting point and a new exclusion point to the active Model Slicer configuration.

Open the AddStartingPointAndHighlightTheModelSliceExample example model.

openExample('slcheck/AddStartingPointAndHighlightTheModelSliceExample');

Double click on the sldvSliceClimateControlExample model in the current directory.

Define the options file opts for the model.

opts = slsliceroptions('sldvSliceClimateControlExample');

Add a new starting point on the Out1 block.

addStartingPoint(opts,'sldvSliceClimateControlExample/Out1')

Add a new exclusion point on the Out2 block.

addExclusionPoint(opts,'sldvSliceClimateControlExample/Out2')

Add a starting point and an exclusion point to the active Model Slicer configuration without overwriting the original configuration.

Open the AddStartingPointAndHighlightTheModelSliceExample example model.

openExample('slcheck/AddStartingPointAndHighlightTheModelSliceExample');

Double click on the sldvSliceClimateControlExample model in the current directory.

Define the options file opts for the model.

opts = slsliceroptions('sldvSliceClimateControlExample');

Create a second Model Slicer options configuration for the model.

addConfiguration(opts)

Add a new starting point on the Out1 block for the second Model Slicer options configuration.

addStartingPoint(opts.Configuration(2),'sldvSliceClimateControlExample/Out1')

Add a new exclusion point on the Out2 block for the second Model Slicer options configuration.

addExclusionPoint(opts.Configuration(2),'sldvSliceClimateControlExample/Out2')

Input Arguments

collapse all

Name of the model whose Model Slicer options object you configure.

Name of the SLMS file containing the Model Slicer options object that you configure.

Example: slsliceroptions('slexAircraftExample.slms')

Structure containing the options for the Model Slicer configuration.

Version History

Introduced in R2015b