Documentation

# `ldegree`

Lowest degree of the terms in a polynomial

MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

## Syntax

```ldegree(`p`)
ldegree(`p`, `x`)
ldegree(`f`, <`vars`>)
ldegree(`f`, <`vars`>, `x`)
```

## Description

`ldegree(p)` returns the lowest total degree of the terms of the polynomial `p`.

`ldegree(p, x)` returns the lowest degree of the terms in `p` with respect to the variable `x`.

If the first argument `f` is not element of a polynomial domain, then `ldegree` converts the expression to a polynomial via `poly``(f)`. If a list of indeterminates is specified, then the polynomial `poly``(f, vars)` is considered.

`ldegree(f, vars, x)` returns 0 if `x` is not an element of `vars`.

The low degree of the zero polynomial is defined as 0.

## Examples

### Example 1

The lowest total degree of the terms in the following polynomial is computed:

`ldegree(x^3 + x^2*y^2)`

The next call regards the expression as a polynomial in `x` with a parameter `y`:

`ldegree(x^3 + x^2*y^2, x)`

The next expression is regarded as a bi-variate polynomial in `x` and `z` with coefficients containing the parameter `y`. The total degree with respect to `x` and `z` is computed:

`ldegree(x^3*z^2 + x^2*y^2*z, [x, z])`

We compute the low degree with respect to `x`:

`ldegree(x^3*z^2 + x^2*y^2*z, [x, z], x)`

A polynomial in `x` and `z` is regarded constant with respect to any other variable, i.e., its corresponding degree is 0:

`ldegree(poly(x^3*z^2 + x^2*y^2*z, [x, z]), y)`

## Parameters

 `p` A polynomial of type `DOM_POLY` `f` `vars` A list of indeterminates of the polynomial: typically, identifiers or indexed identifiers `x` An indeterminate

## Return Values

Nonnegative number. `FAIL` is returned if the input cannot be converted to a polynomial.

` f`, `p`