Main Content

Advisor.addExclusion

Add exclusions to a model or a file

Description

Advisor.addExclusion('modelname','Name,Value') (the fist 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

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.

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

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 blocktype 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 Stateflow blocks and Subsystems in the model using this argument.

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'});

Introduced in R2021a