areequal (Control Design and Simulation Module, MathScript Function)
Member of the info class.
Syntax
equal = areequal(SysIn_1, SysIn_2, tol)
Description
Determines whether two models are identical within a specified tolerance.
Inputs
Name | Description |
SysIn_1 | Specifies a linear time-invariant (LTI) system in transfer function, zero-pole-gain, or state-space form. |
SysIn_2 | Specifies an LTI system. This model must be in the same form as the SysIn_1 model. |
tol | Specifies the tolerance. The default value of tol is 0.00000001. tol is a real scalar. |
Outputs
Name | Description |
equal | Returns 1 if the two models are equal. This function returns 0 if the two models are not equal. equal is a Boolean. |
Examples
SysIn_1 = ss(-1, 1, 2, 0);SysIn_2 = (1+1.e-10)*SysIn_1;
areequal(SysIn_1, SysIn_2, 1.e-9);