LagOp class

Create lag operator polynomial (LagOp) object

Description

Create a lag operator polynomial A(L), by specifying the coefficients and, optionally, the corresponding lags.

Construction

A = LagOp(coefficients)

A = LagOp(coefficients,Name,Value) creates a lag operator polynomial with additional options specified by one or more Name,Value pair arguments. Name can also be a property name and Value is the corresponding value. Name must appear inside single quotes (''). You can specify several name-value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Input Arguments

coefficients

The coefficients of the lag operator polynomial. Generally, coefficients is a cell array of square matrices. For convenience, coefficients may also be specified in other ways:

  • As a vector, representing a univariate time series polynomial with multiple lags.

  • As a matrix, representing a multivariate time series polynomial with a single lag.

  • As an existing LagOp object, to be updated according to the optional inputs.

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.

'Lags'

Vector of integer lags associated with the polynomial coefficients. If specified, the number of lags must be the same as the number of coefficients.

Default: Coefficients are associated with lags 0, 1,..., numCoefficients–1.

'Tolerance'

Nonnegative scalar tolerance used to determine which lags are included in the object. Specifying a tolerance greater than the default (1e–12) excludes lags with near-zero coefficients. A lag is excluded if the magnitudes of all elements of the coefficient matrix are less than or equal to the specified tolerance.

Default: 1e–12

Output Arguments

A

Lag operator polynomial (LagOp) object.

Properties

Coefficients

Lag indexed cell array of nonzero polynomial coefficients

Degree

Polynomial degree (the highest lag associated with a nonzero coefficient)

Dimension

Polynomial dimension (the number of time series to which it may be applied)

Lags

Polynomial lags associated with nonzero coefficient

Methods

filterApply lag operator polynomial to filter time series
isEqLagOpDetermine if two LagOp objects are same mathematical polynomial
isNonZeroFind lags associated with nonzero coefficients of LagOp objects
isStableDetermine stability of lag operator polynomial
minusLag operator polynomial subtraction
mldivideLag operator polynomial left division
mrdivideLag operator polynomial right division
mtimesLag operator polynomial multiplication
plusLag operator polynomial addition
reflectReflect lag operator polynomial coefficients around lag zero
toCellArrayConvert lag operator polynomial object to cell array

Copy Semantics

Value. To learn how value classes affect copy operations, see Copying Objects in the MATLAB® documentation.

Indexing

The coefficients of lag operator polynomials are accessible by lag-based indexing; that is, by specifying nonnegative integer lags associated with the coefficients of interest.

Examples

expand all

Specify a Lag Operator Polynomial

Create a LagOp polynomial object:

A = LagOp({1 -0.6 0.08});

Return the coefficient at lag L = 2:

a2 = A.Coefficients{2};

Assign a nonzero coefficient to the 3rd lag:

A.Coefficients{3} = 0.5;
Was this topic helpful?