www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/DifferentiateQuotientOfPolynomialsExample.m
%% Differentiate Quotient of Polynomials % Create two vectors to represent the polynomials in the quotient, % % $$\frac{x^4-3x^2-1}{x+4}.$$ % p = [1 0 -3 0 -1]; v = [1 4]; %% % Use |polyder| with two output arguments to calculate % % $$\frac{q(x)}{d(x)}=\frac{d}{dx} \left[ \frac{p(x)}{v(x)} \right].$$ % [q,d] = polyder(p,v) %% % The result is % % $$\frac{q(x)}{d(x)}=\frac{3x^4+16x^3-3x^2-24x+1}{x^2+8x+16}.$$ %