Quantcast

Documentation Center

  • Trial Software
  • Product Updates

isEqLagOp

Class: LagOp

Determine if two LagOp objects are same mathematical polynomial

Syntax

indicator = isEqLagOp(A,B)
indicator = isEqLagOp(A,B,'Tolerance',tolerance)

Description

indicator = isEqLagOp(A,B) determines if two lag operator polynomials A and B are the same. indicator is a boolean indicator for the equality test. TRUE indicates the two polynomials are identical to within tolerance; FALSE indicates the two polynomials are not identical to within tolerance.

indicator = isEqLagOp(A,B,'Tolerance',tolerance)

If at least one of A or B is a lag operator polynomial object, the other can be a cell array of matrices (initial lag operator coefficients), or a single matrix (zero-degree lag operator).

Input Arguments

A

Lag operator polynomial object, as created by LagOp, against which the equality of B is tested.

B

Lag operator polynomial object, as created by LagOp, against which the equality of A is tested.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

'Tolerance'

Nonnegative scalar tolerance used for testing equality. The default is 1e-12. Specifying a tolerance greater than the default relaxes the comparison criterion. Two polynomials are deemed sufficiently close to indicate equality if the differences in magnitude of all elements of all coefficient matrices at all lags are less than or equal to the specified tolerance.

Default: 1e-12

Output Arguments

indicator

Boolean indicator for the equality test. true indicates the two polynomials are identical to within tolerance; false indicates the two polynomials are not identical to within tolerance.

Examples

expand all

Determine the Equivalence of Two Lag Polynomials

Create a lag operator polynomial and convert it to a cell array:

A = LagOp({1 0.8 0.3 0.2});
B = toCellArray(A);
isEqLagOp(A,B)
ans =

     1

The converted cell array is equivalent to the LagOp polynomial object.

See Also

How To

Was this topic helpful?