Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#2 |
高级会员
注册日期: 2007-06-24
年龄: 70
帖子: 188
声望力: 21 ![]() |
![]()
x=[0.7 0.1312 0.02685 0.00943 0.0033];
y=[0.3636 0.1682 0.4741 1.2704 2.07]; fx=@(b,x)b(1)*x.^b(2); b=rand(1,2); b=lsqcurvefit(fx,b,x,y) b=nlinfit(x,y,fx,b) plot(x,y,'o','markerfacecolor','b') x1=min(x):range(x)/80:max(x); y1=fx(b,x1); hold on plot(x1,y1,'linewidth',2) |
![]() |
![]() |