Main Content

satisfiedBy

Class: matlab.unittest.constraints.Tolerance
Package: matlab.unittest.constraints

Determine whether two values are within tolerance

Syntax

TF = satisfiedBy(tolObj,actVal,expVal)

Description

TF = satisfiedBy(tolObj,actVal,expVal) determines whether two values, actVal and expVal, are within the tolerance defined by tolObj. The satisfiedBy method is used to determine whether the tolerance is met. It returns true or false (logical 0 or 1). When creating a custom tolerance, a class author uses this method to contain the tolerance definition.

Input Arguments

actVal

Value to determine if is within tolerance of expVal

tolObj

Tolerance instance

expVal

Expected value