Main Content

setFilterName

Class: slcoverage.Filter
Namespace: slcoverage

Set name of coverage filter object

Since R2020a

Syntax

setFilterName(filterObj,filterName)

Description

setFilterName(filterObj,filterName) sets the name 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 name, specified 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