matlab中nlinfit非线性拟合求参数x1=[0.4292 0.4269 0.381 0.4015 0.4117 0.3017];>> x2=[0.00014 0.00059 0.0126 0.0061 0.00425 0.0443];>> y=[0.517 0.509 0.44 0.466 0.479 0.309];>> myfunc=inline('2.350176*beta(1)*(1-1/beta(2))*(1-(1-x1^(1/beta(2))

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/30 09:06:46
matlab中nlinfit非线性拟合求参数x1=[0.4292 0.4269 0.381 0.4015 0.4117 0.3017];>> x2=[0.00014 0.00059 0.0126 0.0061 0.00425 0.0443];>> y=[0.517 0.509 0.44 0.466 0.479 0.309];>> myfunc=inline('2.350176*beta(1)*(1-1/beta(2))*(1-(1-x1^(1/beta(2))
xTnF~T)(C{LZ'D(R )N9]'MR8M[ezN~.IR@i 盝fwjFmm˴WMx8?x=܈Z~CSKJ*% \`\6 Wn.6( i.!!u0) (J8FtǗ8TREUEdڵfREN.̧.Yh tf5݅Ɓ'"2ldy%Z!y! X}-@`#9%- HNgHD)IʍKɛip/ُ'  I/ޙ6yI~_=ޛ7ÃhpIgm/ W\qQ3[^o ϧtn>"wxDQ|"$\RQ9tlufdߙmtmkWs5( eQUpgYqR&sipNVҠ_ rg"o<năd,ލGߚ;NnKs^_h'~ Sp/<L_J8|1y.z4P ]J;VMu߱@jE+VYAń>a-fj8M~tϱdzȴ-XKv dDmŬzM{v|>rf; ,$A\ &f j7WMڴzcȠ6d/He-x?BfDuU}a Zղ! sgȇx*17cdi> 

matlab中nlinfit非线性拟合求参数x1=[0.4292 0.4269 0.381 0.4015 0.4117 0.3017];>> x2=[0.00014 0.00059 0.0126 0.0061 0.00425 0.0443];>> y=[0.517 0.509 0.44 0.466 0.479 0.309];>> myfunc=inline('2.350176*beta(1)*(1-1/beta(2))*(1-(1-x1^(1/beta(2))
matlab中nlinfit非线性拟合求参数
x1=[0.4292 0.4269 0.381 0.4015 0.4117 0.3017];
>> x2=[0.00014 0.00059 0.0126 0.0061 0.00425 0.0443];
>> y=[0.517 0.509 0.44 0.466 0.479 0.309];
>> myfunc=inline('2.350176*beta(1)*(1-1/beta(2))*(1-(1-x1^(1/beta(2)))^beta(2))^2*(x1^(-1/beta(2))-1)^(-beta(2))*x1^(-1/beta(2)-0.5)*x2','beta','x1','x2');
>> beta=nlinfit(x1,x2,y,myfunc,[8 0.5]);
y是函数;x1,x2是自变量;要求beta(1)和beta(2),哪里不对?
出错信息
Error using ==> statset
Expected argument 2 to be a parameter name string or an options structure
created with STATSET.
Error in ==> nlinfit at 91
options = statset(statset('nlinfit'),options);
beta=nlinfit(x,y,@myfun,[8 0.5])
我怎么把这句改为beta=nlinfit(x,y,@myfun,[8;0.5])才能运行出结果?我不太懂啊.还有,它上面有些警告.Warning:Rank deficient,rank = 1,tol = 5.7039e-013.
> In nlinfit at 192
Warning:The Jacobian at the solution is ill-conditioned,and some
model parameters may not be estimated well (they are not identifiable).
Use caution in making predictions.
> In nlinfit at 272
beta =
1.0e+010 *
-5.6511
0.0000
是不是数据不够好,拟合的有些不好?

matlab中nlinfit非线性拟合求参数x1=[0.4292 0.4269 0.381 0.4015 0.4117 0.3017];>> x2=[0.00014 0.00059 0.0126 0.0061 0.00425 0.0443];>> y=[0.517 0.509 0.44 0.466 0.479 0.309];>> myfunc=inline('2.350176*beta(1)*(1-1/beta(2))*(1-(1-x1^(1/beta(2))
建立函数文件:
function y = myfun(beta,x)
y = 2.350176*beta(1)*(1-1/beta(2))*(1-(1-x(:,1).^(1/beta(2))).^beta(2)).^2.*(x(:,1).^(-1/beta(2))-1).^(-beta(2)).*x(:,1).^(-1/beta(2)-0.5).*x(:,2);
运行代码:
x=[0.4292 0.4269 0.381 0.4015 0.4117 0.3017; 0.00014 0.00059 0.0126 0.0061 0.00425 0.0443];
x = x';
y=[0.517 0.509 0.44 0.466 0.479 0.309];
y = y';
beta=nlinfit(x,y,@myfun,[8 0.5])
运行结果:
beta =
-55262931764.9336 0.0517