www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/DifferentiatePolynomialExample.m
%% Differentiate Polynomial % Create a vector to represent the polynomial $p(x)=3x^5-2x^3+x+5$. % Copyright 2015 The MathWorks, Inc. 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)