Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#2 |
普通会员
注册日期: 2009-02-22
帖子: 91
声望力: 18 ![]() |
![]()
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为正整数!!! |
![]() |
![]() |