polyder
Polynomial differentiation
Description
Examples
Differentiate Polynomial
Create a vector to represent the polynomial .
p = [3 0 -2 0 1 5];
Use polyder
to differentiate the polynomial. The result is .
q = polyder(p)
q = 1×5
15 0 -6 0 1
Differentiate Product of Polynomials
Create two vectors to represent the polynomials and .
a = [1 -2 0 0 11]; b = [1 -10 15];
Use polyder
to calculate
q = polyder(a,b)
q = 1×6
6 -60 140 -90 22 -110
The result is
Differentiate Quotient of Polynomials
Create two vectors to represent the polynomials in the quotient,
p = [1 0 -3 0 -1]; v = [1 4];
Use polyder
with two output arguments to calculate
[q,d] = polyder(p,v)
q = 1×5
3 16 -3 -24 1
d = 1×3
1 8 16
The result is
Input Arguments
p
— Polynomial coefficients
vector
Polynomial coefficients, specified as a vector. For example,
the vector [1 0 1]
represents the polynomial ,
and the vector [3.13 -2.21 5.99]
represents the
polynomial .
For more information, see Create and Evaluate Polynomials.
Data Types: single
| double
Complex Number Support: Yes
a,b
— Polynomial coefficients (as separate arguments)
row vectors
Polynomial coefficients, specified as two separate arguments of row vectors.
For more information, see Create and Evaluate Polynomials.
Example: polyder([1 0 -1],[10 2])
Data Types: single
| double
Complex Number Support: Yes
Output Arguments
k
— Differentiated polynomial coefficients
row vector
Differentiated polynomial coefficients, returned as a row vector.
q
— Numerator polynomial
row vector
Numerator polynomial, returned as a row vector.
d
— Denominator polynomial
row vector
Denominator polynomial, returned as a row vector.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Usage notes and limitations:
The output can contain fewer
NaN
s than the MATLAB® output. However, if the input contains aNaN
, the output contains at least oneNaN
.
Thread-Based Environment
Run code in the background using MATLAB® backgroundPool
or accelerate code with Parallel Computing Toolbox™ ThreadPool
.
This function fully supports thread-based environments. For more information, see Run MATLAB Functions in Thread-Based Environment.
GPU Arrays
Accelerate code by running on a graphics processing unit (GPU) using Parallel Computing Toolbox™.
The polyder
function
fully supports GPU arrays. To run the function on a GPU, specify the input data as a gpuArray
(Parallel Computing Toolbox). For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox).
Version History
Introduced before R2006a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)