Main Content

Advisor.addExclusion

Add exclusions to a model or a file

Since R2021a

Description

Advisor.addExclusion('modelname','Name,Value') (the first name-value pair in the syntax should be of Filter type argument) adds an exclusion to an entity in the model. This can be a block, a Subsystem or a Stateflow® entity.

Input Arguments

collapse all

Model name to display all the exclusions.

Name-Value Arguments

Example: Advisor.addExclusion('vdp', 'BlockType', 'Integrator', 'checks', {'mathworks.jmaab.jc_0231', 'mathworks.jmaab.jc_0222'}, 'validateChecks', true);

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can add any number of name-value pairs in the arguments provided that Filter type name-value pair is used only once.

This is an optional argument of type Filter. You can add exclusions to a particular block in the model using this argument.

Example: Advisor.addExclusion('vdp', 'Block', 'vdp:2');

This is an optional argument of type Filter. You can add exclusions to a particular block type in the model using this argument.

Example: Advisor.addExclusion('vdp', 'BlockType', 'Integrator');

This is an optional argument of type Filter. You can add exclusions to a subsystem in the model using this argument.

Example: Advisor.addExclusion('vdp', 'Subsystem', 'vdp:6');

This is an optional argument of type Filter. You can add exclusions to a Library in the model using this argument.

Example: Advisor.addExclusion('vdp', 'Library', 'mCustomlib:6');

This is an optional argument of type Filter. You can add exclusions to a Subsystem with a specific mask type in the model using this argument.

Example: Advisor.addExclusion('vdp', 'MaskType', 'gearSystem');

This is an optional argument of type Filter. You can add exclusions to State Transition Table, MessageViewer or any other Stateflow blocks apart from existing Name-Value Stateflow filters mentioned on this function page.

Example: Advisor.addExclusion('sldvdemo_cruise_control', 'Stateflow, 'sldvdemo_cruise_control:4');

This is an optional argument of type Filter. You can add exclusions to a Stateflow chart in the model using this argument.

Example: Advisor.addExclusion('sldvdemo_cruise_control', 'Stateflow, 'sldvdemo_cruise_control:8');

This is an optional argument of type Filter. You can add exclusions to a Stateflow State in the model using this argument.

Example: Advisor.addExclusion('sldvdemo_cruise_control', 'Stateflow, 'sldvdemo_cruise_control:8');

This is an optional argument of type Filter. You can add exclusions to a Stateflow Transition in the model using this argument.

Example: Advisor.addExclusion('sldvdemo_cruise_control', 'Stateflow, 'sldvdemo_cruise_control:8');

This is an optional argument of type Filter. You can add exclusions to a Stateflow Junction in the model using this argument.

Example: Advisor.addExclusion('sldvdemo_cruise_control', 'Stateflow, 'sldvdemo_cruise_control:8');

This is an optional argument of type Filter. You can add exclusions to a graphical function in Stateflow using this argument.

Example: Advisor.addExclusion('sldvdemo_cruise_control', 'Stateflow, 'sldvdemo_cruise_control:8');

This is an optional argument of type Filter. You can add exclusions to a MATLAB function in Stateflow using this argument.

Example: Advisor.addExclusion('sldvdemo_cruise_control', 'Stateflow, 'sldvdemo_cruise_control:8');

This is an optional argument of type Filter. You can add exclusions to a Simulink function inside Stateflow using this argument.

Example: Advisor.addExclusion('sldvdemo_cruise_control', 'Stateflow, 'sldvdemo_cruise_control:8');

This is an optional argument of type Filter. You can add exclusions to a Stateflow Truth Table in the model using this argument.

Example: Advisor.addExclusion('sldvdemo_cruise_control', 'Stateflow, 'sldvdemo_cruise_control:8');

This is an optional argument of type Filter. You can add exclusions to a Simulink based state in Stateflow using this argument.

Example: Advisor.addExclusion('sldvdemo_cruise_control', 'Stateflow, 'sldvdemo_cruise_control:8');

This is an optional argument. Using this argument you can add exclusions only to selected checks.

If this name-value pair is not used in the input arguments, then the model object will be excluded from all the checks. By default, this option is set to all checks.

Example: Advisor.addExclusion('vdp', 'Block', 'vdp:2', 'rationale', 'Block to be removed later', 'checks', {'mathworks.jmaab.jc_0231'});

This is an optional argument. Using this argument you can validate if the selected checks support exclusions.

Example: Advisor.addExclusion('vdp', 'BlockType', 'Integrator', 'checks', {'mathworks.jmaab.jc_0231', 'mathworks.jmaab.jc_0222'}, 'validateChecks', true);

This is an optional argument. Using this argument you can add a rationale (comment) when adding exclusions.

Example: Advisor.addExclusion('vdp', 'Block', 'vdp:2', 'rationale', 'Block to be removed later', 'checks', {'mathworks.jmaab.jc_0231'});

Version History

Introduced in R2021a