# mpower

Laurent polynomial exponentiation

## Syntax

``Q = mpower(P,pow)``
``Q = P^pow``

## Description

example

````Q = mpower(P,pow)` raises the Laurent polynomial `P` to the power `pow`.```
````Q = P^pow` is equivalent to ```Q = mpower(p,pow)```.```

## Examples

collapse all

Create two Laurent polynomials:

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

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

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

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 ```

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

```b2 = rescale(b,-1/2); a3 == b2```
```ans = logical 1 ```

## Input Arguments

collapse all

Laurent polynomial, specified as a `laurentPolynomial` object.

Power, specified as an integer. If `pow` is negative, `P` must be a monomial.

Example: `Q = mpower(lp,3)` raises the Laurent polynomial `lp` to the third power.

Data Types: `double`

## Output Arguments

collapse all

Laurent polynomial raised to a nonzero power, returned as a `laurentPolynomial` object.

## Version History

Introduced in R2021b