Polynomial differentiation
k = polyder(p)
k = polyder(a,b)
[q,d] = polyder(a,b)
example
k = polyder(p) returns the derivative of the polynomial represented by the coefficients in p,
k
p
k(x)=ddxp(x) .
k = polyder(a,b) returns the derivative of the product of the polynomials a and b,
a,b
a
b
k(x)=ddx[a(x)b(x)] .
[q,d] = polyder(a,b) returns the derivative of the quotient of the polynomials a and b,
q
d
q(x)d(x)=ddx[a(x)b(x)] .
collapse all
Create a vector to represent the polynomial p(x)=3x5-2x3+x+5.
p = [3 0 -2 0 1 5];
Use polyder to differentiate the polynomial. The result is q(x)=15x4-6x2+1.
polyder
q = polyder(p)
q = 1×5 15 0 -6 0 1
Create two vectors to represent the polynomials a(x)=x4-2x3+11 and b(x)=x2-10x+15.
a = [1 -2 0 0 11]; b = [1 -10 15];
Use polyder to calculate
q(x)=ddx[a(x)b(x)].
q = polyder(a,b)
q = 1×6 6 -60 140 -90 22 -110
The result is
q(x)=6x5-60x4+140x3-90x2+22x-110.
Create two vectors to represent the polynomials in the quotient,
x4-3x2-1x+4.
p = [1 0 -3 0 -1]; v = [1 4];
Use polyder with two output arguments to calculate
q(x)d(x)=ddx[p(x)v(x)].
[q,d] = polyder(p,v)
q = 1×5 3 16 -3 -24 1
d = 1×3 1 8 16
q(x)d(x)=3x4+16x3-3x2-24x+1x2+8x+16.
Polynomial coefficients, specified as a vector. For example, the vector [1 0 1] represents the polynomial x2+1, and the vector [3.13 -2.21 5.99] represents the polynomial 3.13x2−2.21x+5.99.
[1 0 1]
[3.13 -2.21 5.99]
For more information, see Create and Evaluate Polynomials.
Data Types: single | double Complex Number Support: Yes
single
double
Polynomial coefficients, specified as two separate arguments of row vectors.
Example: polyder([1 0 -1],[10 2])
polyder([1 0 -1],[10 2])
Differentiated polynomial coefficients, returned as a row vector.
Numerator polynomial, returned as a row vector.
Denominator polynomial, returned as a row vector.
Usage notes and limitations:
The output can contain fewer NaNs than the MATLAB® output. However, if the input contains a NaN, the output contains at least one NaN.
NaN
This function fully supports GPU arrays. For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox).
conv | deconv | polyint | polyval
conv
deconv
polyint
polyval
You have a modified version of this example. Do you want to open this example with your edits?