Main Content

filterName

Class: slcoverage.Filter
Namespace: slcoverage

Get name of coverage filter object

Since R2020a

Syntax

filtName = filterName(filterObj)

Description

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

Examples

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.

setFilterName(filt,'myCovFilter');
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 =

    'myCovFilter'


filtDescr =

    'Justify missing coverage for unreachable outcomes'

Alternatives

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