# reflect

Class: LagOp

Reflect lag operator polynomial coefficients around lag zero

## Syntax

```B = reflect(A)```

## Description

Given a lag operator polynomial object A(L),```B = reflect(A)``` negates all coefficient matrices except the coefficient matrix at lag 0. For example, given a polynomial of degree p,

`$A\left(L\right)={A}_{0}+{A}_{1}L+{A}_{2}{L}^{2}+...+{A}_{P}{L}^{p}$`

the reflected polynomial B(L) is

`$B\left(L\right)={A}_{0}-{A}_{1}L-{A}_{2}{L}^{2}-...-{A}_{P}{L}^{p}$`

with the same degree and dimension as A(L).

## Examples

expand all

### Reflect a Lag Operator Polynomial

Create a `LagOp` polynomial and its reflection:

```A = LagOp({0.8 1 0 .6}); B = reflect(A) ```
```B = 1-D Lag Operator Polynomial: ----------------------------- Coefficients: [0.8 -1 -0.6] Lags: [0 1 3] Degree: 3 Dimension: 1 ```