Main Content


Class: slcoverage.Filter
Package: slcoverage

Get name of coverage filter object


filtName = filterName(filterObj)


filtName = filterName(filterObj) returns the name of the specified coverage filter.

Input Arguments

expand all

Coverage filter, specified as an slcoverage.Filter object.

Data Types: slcoverage.Filter

Output Arguments

expand all

Filter name, returned 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.

Introduced in R2020a