Skip to Main Content Skip to Search
Product Documentation

AddTestFilter - Add user-defined test filter to data set

Syntax

D = AddTestFilter(D, expr)

Description

This is a method of mbcmodel.data.

A test filter is a constraint on the data set used to exclude some entire tests. You define the test filter using logical operators or functions on the existing variables.

D is your data object.

expr is the input string holding the definition of the new test filter.

Examples

AddTestFilter(d1, 'any(n>1000)');

The effect of this filter is to include all tests in which all records have speed (n) greater than 1000.

Similar to filters, test filter functions are iteratively evaluated on each test, receiving an nx1 vector for each variable input in a test, and must return an 1x1 logical array out. In that array, true (or 1) indicates a record to keep, and false (or 0) indicates a test to discard.

AddTestFilter(data, 'length(LOGNO) > 6');

The effect of this filter is to include all tests with more than 6 records.

See Also

AddFilter | ModifyTestFilter | RemoveTestFilter | TestFilters

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS