gusucode.com > 《精通matlab 7》包括配套光盘 > 配套光盘里的程序附件/Ex-30/testclass/@polynom/diff.m
function q = diff(p) % POLYNOM/DIFF DIFF(p) is the derivative of the polynom p. c = p.c; d = length(c) - 1; % degree q = polynom(p.c(1:d).*(d:-1:1));