# laurentPolynomial

Create Laurent polynomial

## Description

Use the laurentPolynomial object to create a Laurent polynomial with real-valued polynomial coefficients. You can specify the maximum order of the polynomial. You can perform mathematical and logical operations on Laurent polynomials. You can also create a lifting scheme associated with a pair of Laurent polynomials.

## Creation

### Description

lpoly = laurentPolynomial creates the constant Laurent polynomial, where the constant is equal to 1 and the maximum order is equal to 0.

example

lpoly = laurentPolynomial(Name=Value) creates a Laurent polynomial with Properties specified by name-value arguments. For example, laurentPolynomial(MaxOrder=2) creates a Laurent polynomial with maximum order equal to 2. You can specify multiple name-value arguments.

## Properties

expand all

Laurent polynomial coefficients, specified as a real-valued vector. If k is the length of the vector C, then lpoly = laurentPolynomial(Coefficients=C) represents the Laurent polynomial

$\text{lpoly}\left(z\right)=\sum _{m=1}^{k}C\left(m\right){z}^{1-m}.$

Example: If C = [4 3 2 1], then P = laurentPolynomial(Coefficients=C) represents the Laurent polynomial $\text{P}\left(z\right)=4+3{z}^{-1}+2{z}^{-2}+{z}^{-3}.$

Data Types: double

Maximum order of the Laurent polynomial, specified as an integer. If k is the length of the vector C and d is an integer, then lpoly = laurentPolynomial(Coefficients=C,MaxOrder=d) represents the Laurent polynomial

$\text{lpoly}\left(z\right)=\sum _{m=1}^{k}C\left(m\right){z}^{d-m+1}.$

Example: If C = [2 4 6 8], then P = laurentPolynomial(Coefficients=C,MaxOrder=1) represents the Laurent polynomial $\text{P}\left(z\right)=2z+4+6{z}^{-1}+8{z}^{-2}.$

Data Types: double

## Object Functions

expand all

 degree Degree of Laurent polynomial euclid Euclidean algorithm for Laurent polynomials polyphase Polyphase components of Laurent polynomial mpower Laurent polynomial exponentiation horzcat Horizontal concatenation of Laurent polynomials vertcat Vertical concatenation of Laurent polynomials lp2filters Laurent polynomials to filters lp2LS Laurent polynomials to lifting steps and normalization factors ne Laurent polynomials inequality test rescale Rescale Laurent polynomial
 dyaddown Dyadic downsampling of Laurent polynomial or Laurent matrix dyadup Dyadic upsampling of Laurent polynomial or Laurent matrix eq Laurent polynomials or Laurent matrices equality test plus Laurent polynomial or Laurent matrix addition minus Laurent polynomial or Laurent matrix subtraction mtimes Laurent polynomial or Laurent matrix multiplication reflect Laurent polynomial or Laurent matrix reflection uminus Unary minus for Laurent polynomial or Laurent matrix

## Examples

collapse all

Create three Laurent polynomials:

• $a\left(z\right)=1+{z}^{-1}$

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

• $c\left(z\right)={z}^{3}+3{z}^{2}+5z+7$

a = laurentPolynomial(Coefficients=[1 1])
a =
laurentPolynomial with properties:

Coefficients: [1 1]
MaxOrder: 0

b = laurentPolynomial(Coefficients=[1 3 0 1],MaxOrder=2)
b =
laurentPolynomial with properties:

Coefficients: [1 3 0 1]
MaxOrder: 2

c = laurentPolynomial(Coefficients=[1 3 5 7],MaxOrder=3)
c =
laurentPolynomial with properties:

Coefficients: [1 3 5 7]
MaxOrder: 3

Add the two polynomials $a\left(z\right)$ and $b\left(z\right)$. Use the helper function helperPrintLaurent to print the result in algebraic form.

polySum = plus(a,b)
polySum =
laurentPolynomial with properties:

Coefficients: [1 3 1 2]
MaxOrder: 2

res = helperPrintLaurent(polySum);
disp(res)
z^(2) + 3*z + 1 + 2*z^(-1)

Add 2 to $b\left(z\right)$.

consSum = b+2;
res = helperPrintLaurent(consSum);
disp(res)
z^(2) + 3*z + 2 + z^(-1)

Subtraction

Subtract $a\left(z\right)$ from $b\left(z\right)$.

polyDiff = minus(b,a);
res = helperPrintLaurent(polyDiff);
disp(res)
z^(2) + 3*z - 1

Subtract $a\left(z\right)$ from 1.

consDiff = 1-a;
res = helperPrintLaurent(consDiff);
disp(res)
- z^(-1)

Multiplication

Multiply $a\left(z\right)$ and $b\left(z\right)$.

polyProd = mtimes(a,b);
res = helperPrintLaurent(polyProd);
disp(res)
z^(2) + 4*z + 3 + z^(-1) + z^(-2)

Compute $a\left(z\right)c\left(z\right)-b\left(z\right)$.

polyProd2 = a*c-b;
res = helperPrintLaurent(polyProd2);
disp(res)
z^(3) + 3*z^(2) + 5*z + 12 + 6*z^(-1)

To multiply a Laurent polynomial by a constant, use the rescale function.

consProd = rescale(b,7);
res = helperPrintLaurent(consProd);
disp(res)
7*z^(2) + 21*z + 7*z^(-1)

Exponentiation

Raise $a\left(z\right)$ to the fourth power.

polyPow = mpower(a,4);
res = helperPrintLaurent(polyPow);
disp(res)
1 + 4*z^(-1) + 6*z^(-2) + 4*z^(-3) + z^(-4)

Compute ${b}^{2}\left(z\right)-c\left(z\right)$.

polyPow2 = b^2-c;
res = helperPrintLaurent(polyPow2);
disp(res)
z^(4) + 5*z^(3) + 6*z^(2) - 3*z - 1 + z^(-2)

Create two Laurent polynomials:

• $a\left(z\right)=z-1$

• $b\left(z\right)=-2{z}^{3}+6{z}^{2}-7z+2$

a = laurentPolynomial(Coefficients=[1 -1],MaxOrder=1);
b = laurentPolynomial(Coefficients=[-2 6 -7 2],MaxOrder=3);

Reflection

Obtain the reflection of $b\left(z\right)$.

br = reflect(b);
res = helperPrintLaurent(br);
disp(res)
2 - 7*z^(-1) + 6*z^(-2) - 2*z^(-3)

Unary Minus

Confirm the sum of $b\left(z\right)$ and its unary negation is equal to 0.

b+uminus(b)
ans =
laurentPolynomial with properties:

Coefficients: 0
MaxOrder: 0

Degree

Multiply $a\left(z\right)$ and $b\left(z\right)$. Confirm the degree of the product is equal to the sum of the degrees of $a\left(z\right)$ and $b\left(z\right)$.

ab = a*b;
degree(ab)
ans = 4

degree(a)+degree(b)
ans = 4

Exponentiation

Raise $a\left(z\right)$ to the third power. Confirm the result is not equal to $b\left(z\right)$.

a3 = a^3;
a3 ~= b
ans = logical
1

Rescale

Confirm $a\left(z\right)$ raised to the third power is equal to $-b\left(z\right)/2-z/2$.

zt = laurentPolynomial(Coefficients=[-1/2],MaxOrder=1);
b2 = rescale(b,-1/2)+zt;
eq(a3,b2)
ans = logical
1

Create the Laurent polynomial $c\left(z\right)=\sum _{k=-3}^{4}\left(-1{\right)}^{k}\phantom{\rule{0.16666666666666666em}{0ex}}k\phantom{\rule{0.16666666666666666em}{0ex}}{z}^{k}$. Obtain the degree of $c\left(z\right)$.

cfs = (-1).^(-3:4).*(-3:4);
c = laurentPolynomial(Coefficients=fliplr(cfs),MaxOrder=4);
res = helperPrintLaurent(c);
disp(res)
4*z^(4) - 3*z^(3) + 2*z^(2) - z + z^(-1) - 2*z^(-2) + 3*z^(-3)

degree(c)
ans = 7

Obtain the dyadic upsampling and downsampling of $c\left(z\right)$. Obtain the degree of both polynomials.

dUp =
laurentPolynomial with properties:

Coefficients: [4 0 -3 0 2 0 -1 0 0 0 1 0 -2 0 3]
MaxOrder: 8

degree(dUp)
ans = 14

dDown =
laurentPolynomial with properties:

Coefficients: [4 2 0 -2]
MaxOrder: 2

degree(dDown)
ans = 3