回复: 求助,请高手找错误。
p = polyfit(x,y,n) finds the coefficients of a polynomial p(x) of degree n that fits the data, p(x(i)) to y(i), in a least squares sense.
程序如下:
x=[12,14,16,18];
y=[132.291,113.019,90.259,70.757];
p=polyfit(x,y,2)
y=poly2sym(p)
其中n为正整数!!!
|