# reflect

Laurent polynomial or Laurent matrix reflection

## Syntax

``Q = reflect(P)``

## Description

example

````Q = reflect(P)` returns the reflection of the Laurent polynomial or the Laurent matrix specified by `P`. If `P` is a Laurent matrix, the function reflects the matrix elements. NoteThe `laurentPolynomial` and `laurentMatrix` objects have their own versions of `reflect`. The input data type determines which version is executed. ```

## Examples

collapse all

Create a Laurent polynomial $a\left(z\right)=5{z}^{6}+4{z}^{5}+3{z}^{4}+2{z}^{3}$.

`a = laurentPolynomial(Coefficients=[5 4 3 2],MaxOrder=6)`
```a = laurentPolynomial with properties: Coefficients: [5 4 3 2] MaxOrder: 6 ```

Obtain the reflection of $a\left(z\right)$. Confirm the maximum order of the reflection is –3.

`b = reflect(a)`
```b = laurentPolynomial with properties: Coefficients: [2 3 4 5] MaxOrder: -3 ```

Create two Laurent polynomials:

• $a\left(z\right)=-{z}^{3}+2{z}^{2}-3z+4$

• $b\left(z\right)=5{z}^{2}-z-{z}^{-1}+{z}^{-2}$

```lpA = laurentPolynomial(Coefficients=[-1 2 -3 4],MaxOrder=3); lpB = laurentPolynomial(Coefficients=[5 -1 0 -1 1],MaxOrder=1);```

Create the Laurent matrix $\left[\begin{array}{cc}\mathit{a}\left(\mathit{z}\right)& 0\\ 1& \mathit{b}\left(\mathit{z}\right)\end{array}\right]$.

`lmat = laurentMatrix(Elements={lpA,0;1,lpB});`

Obtain the reflection of the matrix. Inspect the diagonal elements of the reflection.

```lmatref = reflect(lmat); lmatref.Elements{1,1}```
```ans = laurentPolynomial with properties: Coefficients: [4 -3 2 -1] MaxOrder: 0 ```
`lmatref.Elements{2,2}`
```ans = laurentPolynomial with properties: Coefficients: [1 -1 0 -1 5] MaxOrder: 3 ```

## Input Arguments

collapse all

Laurent polynomial or Laurent matrix, specified as a `laurentPolynomial` object or a `laurentMatrix` object, respectively.

## Output Arguments

collapse all

Reflection of a Laurent polynomial or a Laurent matrix, returned as a `laurentPolynomial` object or a `laurentMatrix` object. The reflection of a Laurent polynomial P(z) is the Laurent polynomial Q(z) = P(1/z).

## Version History

Introduced in R2021b