# evalRequirement

**Class: **sdo.requirements.FunctionMatching

**Package: **sdo.requirements

Evaluate satisfaction of function matching requirement

## Syntax

`evaluation = evalRequirement(requirement,dependentVar)`

evaluation = evalRequirement(requirement,dependentVar,indepVar1,...,indepVarN)

## Description

evaluates whether the test data `evaluation`

= evalRequirement(`requirement`

,`dependentVar`

)`dependentVar`

matches the function
that is specified in the `Type`

property of the
`requirement`

object. The software computes the specified
function using default independent variable vectors with value ```
[0 1 2
...]
```

. There is an independent variable vector corresponding to each
dimension of `dependentVar`

, and the length of each independent
variable vector is the same as the size of `dependentVar`

in the
corresponding dimension.

For example, consider a two-dimensional `dependentVar`

of size 3-by-2. To
compute a linear function of the form $${a}_{0}+{a}_{1}{X}_{1}+{a}_{2}{X}_{2}$$, the software uses the independent variable vectors
`X`

and
_{1} = [0 1 2]`X`

. The software calculates
the fit coefficients _{2} = [0 1]`a`

,
_{0}`a`

, and
_{1}`a`

and then calculates the error
between the test data and the linear function._{2}

specifies the independent variable vectors to use for computing the function.`evaluation`

= evalRequirement(`requirement`

,`dependentVar`

,`indepVar1,...,indepVarN`

)

## Input Arguments

## Output Arguments

## Examples

## Version History

**Introduced in R2016b**