# eq

Laurent polynomials or Laurent matrices equality test

## Syntax

``tf = eq(A,B)``
``tf = (A == B)``

## Description

example

````tf = eq(A,B)` compares the pair of Laurent polynomials or Laurent matrices `A` and `B` and returns `1` (`true`) if the two are identical and `0` (`false`) otherwise. NoteThe `laurentPolynomial` and `laurentMatrix` objects have their own versions of `eq`. The input data type determines which version is executed. ```
````tf = (A == B)` is equivalent to ```tf = eq(A,B)```.```

## Examples

collapse all

Create two Laurent polynomials:

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

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

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

Confirm $a\left(z\right)$ and $b\left(z\right)$ are not equal.

`a ~= b`
```ans = logical 1 ```

Confirm $2a\left(z\right)+10$ and $b\left(z\right)$ are equal.

```c = rescale(a,2)+10; eq(c,b)```
```ans = logical 1 ```

## Input Arguments

collapse all

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

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

## Output Arguments

collapse all

Equality test result, returned as a numeric or logical `1` (`true`) or `0` (`false`).

## Version History

Introduced in R2021b