evalRequirement
Class: sdo.requirements.SmoothnessConstraint
Package: sdo.requirements
Evaluate satisfaction of smoothness constraint requirement
Syntax
evaluation = evalRequirement(requirement,variableData)
evaluation = evalRequirement(requirement,variableData,indepVar1,...,indepVarN)
Description
evaluates
whether the test data, evaluation
= evalRequirement(requirement
,variableData
)variableData
, satisfies
the smoothness constraint requirement that is specified in the requirement
object.
The software calculates the gradient magnitude of the test data, and
compares it to the bound specified in the GradientBound
property
of the object. For calculating the gradient, the software assumes
the spacing between data points in each dimension is 1
.
A positive evaluation
value indicates that the
requirement has been violated.
For more information about how the gradient magnitude is calculated, see Algorithms.
uses evaluation
= evalRequirement(requirement
,variableData
,indepVar1,...,indepVarN
)indepVar1,...,indepVarN
to
specify the spacing between test data points in each of the N
dimensions
of the data.
Input Arguments
Output Arguments
Examples
Algorithms
To understand how the gradient magnitude is computed, consider
test data F
from a two-dimensional variable that
is a function of independent variables x1
and x2
.
The gradient is defined as:
The gradient magnitude is:
Similarly, the gradient for an N-dimensional variable is:
To compute the gradient magnitude, the software computes the
partial derivative in each dimension by computing the difference between
successive test data in that dimension and dividing by the spacing
between test data in that dimension. If you specify the spacing between
test data in each dimension in indepVar1,...,indepVarN
,
the software uses the specified spacing. If you do not specify the
spacing, the software assumes the test data is spaced 1 step apart
in each dimension. The software normalizes the final gradient magnitude
by the GradientBound
property of requirement
,
and returns the normalized value in evaluation
.
Version History
Introduced in R2016b