![]() |
求助!求解复杂非线性方程组,急急急!!!在线等
大家帮忙看看,我的程序哪里出错了
我自己编了个程序,不知道哪里出错了,一直是busy,不出结果,大家帮忙看看。拜托 程序如下: function F = equation08729(x,y,z) %x代表α;y代表β;z代表q syms x y z n=23;f1=0;f2=0;g2=0;h1=0;h2=0;h3=0; t=[126,118,40,67,164,638,750,69,71,7,22,124,91,139,70,436,19,357,49,26,163,108,110]; for i=2:n for j=1:i-1 f1=f1+t(j); end f2=f2+(t(i)+z*f1)^y-(z*f1)^y; g2=g2+log(t(i)+z*f1)-((t(i)+z*f1)/x)^y*log((t(i)+z*f1)/x)+(z*f1/x)^y*log(z*f1/x); h1=h1+f1/(t(i)+z*f1); h2=h2+f1^y; h3=h3+(t(i)+z*f1)^(y-1)*f1; end f3=y/x^(y+1)*f2+(y*(t(1)/x)^y-n-y+1)/x; g3=n/y+log(t(1)/x)-(t(1)/x)^y*log(t(1)/x)+g2; h4=(y-1)*h1+y*z^(y-1)/x^y*h2-y/x^y*h3; F=[f3;g3;h4]; %%%[x0,y0,z0] = [80; 1;0.5]; % Make a starting guess at the solution %%%x0=80;y0=1;z0=0.5; options=optimset('Display','iter'); % Option to display output set(0,'RecursionLimit',10000); [x,y,z] = fsolve(@equation08729,[80,1,0.5],options); % Call optimizer |
所有时间均为北京时间。现在的时间是 02:56。 |
Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.