例如:
x=[318; 268; 224; 202; 156; 92 );
p=fittype(a*xb*sin ) 0.01*x ),independent ),x ) )
%p=fittype(a*x.^2b*xc )、) independent )、) x );
%p=fittype(a*xc )、) independent () x ) )
f=fit(x,y,p ) ) )。
打印(f,x,y ) ) )。
%通用模型:
%f(x )=a*xb*sin ) 0.01*x ) c
% coefficients (使用95 %确认边界) :
% a=-0.0485 (-0.1954,0.0984 )。
% b=75.64 (45.04,106.2 ) )。
% c=143.7 (95.11,192.2 ) )。
%同样使用
x=[318; 268; 224; 202; 156; 92 );
%p=fittype(a*xb*sin ) 0.01*x )、(independent )、(x ) ) )
p=fittype(a*x.^2b*xc )、) independent )、) x );
%p=fittype(a*xc )、) independent () x ) )
f=fit(x,y,p ) ) )。
打印(f,x,y ) ) )。
%通用模型:
%f(x )=a*x.^2 b*x c
% coefficients (使用95 %确认边界) :
%a=-0.003019(-0.004065,-0.001972 )。
% b=0.8989 (0.4636,1.334 ) )。
% c=143 (101.2,184.9 ) )。
如何求两个相关系数? 你用它来判断哪个拟合更好?
d1.jpg
(16.58 KB,下载次数: 0 ) )。
2016-11-5上传15:10
通用模型: f (x )=a*xb*sin ) 0.01*x ) c coefficients (with 95 % confidence bounds ) :
d2.jpg
(16.42 KB,下载次数: 0 )。
2016-11-5上传15:15
%通用模型:% f (x )=a* x.^ 2b * xc % coefficients (with 95 % confidence bounds ) : % .