Main Content


Class: slcoverage.Filter
Namespace: slcoverage

Set description of coverage filter object

Since R2020a




setFilterDescription(filterObj,descr) sets the description of the filter to the specified value.

Input Arguments

expand all

Coverage filter, specified as an slcoverage.Filter object.

Data Types: slcoverage.Filter

Coverage filter description, specified as a character array or string array.

Data Types: char | string


expand all

This example shows how to use the slcoverage.Filter methods to set and get filter names and descriptions.

Create a new filter object by using the slcoverage.Filter class.

filt = slcoverage.Filter;

Set the filter name and description by using setFilterName and setFilterDescription, respectively.

setFilterDescription(filt,'Justify missing coverage for unreachable outcomes');

Get the filter name and description by using filterName and filterDescription with the filter object as the input.

filtName = filterName(filt)
filtDescr = filterDescription(filt)
filtName =


filtDescr =

    'Justify missing coverage for unreachable outcomes'


You can also create, edit, and view filters in Simulink®. See Create, Edit, and View Coverage Filter Rules for more information.

Version History

Introduced in R2020a