首页 > 编程知识 正文

用matlab计算线性相关系数,matlab自相关系数函数

时间:2023-05-03 09:06:43 阅读:40076 作者:1239

例如:

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 ) : % .

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。