Main Content

setFilterDescription

Class: slcoverage.Filter
Namespace: slcoverage

Set description of coverage filter object

Since R2020a

Syntax

setFilterDescription(filterObj,descr)

Description

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

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