%% Differentiate Polynomial
% Create a vector to represent the polynomial p(x)=3x^5-2x^3+x+5.

p = [3 0 -2 0 1 5];

%
% Use polyder to differentiate the polynomial. The result is q(x)=15x^4-6x^2+1.

q = polyder(p)

% Copyright 2015 The MathWorks, Inc.