matlab 函数 解释function[poly]=polyadd(poly1,poly2)

function[poly]=polyadd(poly1,poly2)
%polyadd(poly1,poly2) adds two polynominals possibly of uneven length
if length(poly1)<length(poly2)
short=poly1;
long=poly2;
else
short=poly2;
long=poly1;
end
mz=length(long)-length(short);
if mz>0
poly=[zeros(1,mz),short]+long;
else
poly=long+short;
end大侠帮忙解释一下!

第1个回答  2013-12-04
多项式相加。