Main Content

degree

Degree of Laurent polynomial

Since R2021b

    Description

    example

    deg = degree(P) returns the degree of the Laurent polynomial P.

    If P(z) is a Laurent polynomial P(z)=k=mnCkzk, where m and n are integers, the degree of P(z) is n-m.

    Examples

    collapse all

    Create two Laurent polynomials:

    • a(z)=z-1

    • b(z)=-2z3+6z2-7z+2

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

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

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

    Input Arguments

    collapse all

    Laurent polynomial, specified as a laurentPolynomial object.

    Output Arguments

    collapse all

    Degree of Laurent polynomial, returned as a nonnegative integer.

    Extended Capabilities

    C/C++ Code Generation
    Generate C and C++ code using MATLAB® Coder™.

    Version History

    Introduced in R2021b