Package: matlab.unittest.constraints
Comparator for numeric data types
NumericComparator
creates
a comparator for numeric data types. The comparator is satisfied if
inputs are of the same class with equivalent size, complexity, and
sparsity, and the built-in isequaln
function
returns true
.
NumericComparator('Within',
creates
a comparator using a specified tolerance. In this case, tolObj
)NumericComparator
first
checks for equivalent class, size, and sparsity of the actual and
expected values. If these checks fail, the comparator is not satisfied.
If these checks pass and the isequaln
or complexity
check fails, NumericComparator
delegates comparison
to the supplied tolerance, tolObj
.
|
|
|
Specific tolerance used in construction of the comparator, specified
as a |
Value. To learn how value classes affect copy operations, see Copying Objects.