Help CenterHelp Center
Class: slcoverage.Filter Package: slcoverage
Add coverage filtering rule to filter
result = addRule(filter,rule)
result = addRule(filter,rule) adds the filter rule to the specified filter.
result
filter
rule
expand all
slcoverage.Filter
Filter object to add the rule to, specified as an slcoverage.Filter object.
slcoverage.FilterRule
Rule to add to the filter, specified as an slcoverage.FilterRule object.
Rule addition result, returned as 0 or 1.
Create a block selector, a filter, and a rule for the selector. Then add the rule to the filter.
Open the model. Specify coverage settings and turn on coverage recording.
modelName = 'slcoverage_lct_bus'; open_system(modelName); set_param(modelName,'CovMetricStructuralLevel','MCDC','RecordCoverage','on');
Create a BlockSelector object, bl. This block selector selects all blocks in the model with the property 'RelationalOperator'.
BlockSelector
bl
'RelationalOperator'
bl = slcoverage.BlockSelector(slcoverage.BlockSelectorType.BlockType,'RelationalOperator');
Create a filter object, create a rule object, and add the rule to the filter object.
filt = slcoverage.Filter; rule = slcoverage.FilterRule(bl,'Tested elsewhere',slcoverage.FilterMode.Exclude); filt.addRule(rule);
slcoverage.Filter | slcoverage.FilterRule | slcoverage.MetricSelector | slcoverage.BlockSelector | slcoverage.SFcnSelector | removeRule
slcoverage.MetricSelector
slcoverage.BlockSelector
slcoverage.SFcnSelector
removeRule
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office