| 查看: 2396 | 回复: 11 | ||
| 当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖 | ||
[求助]
好心虫友,帮忙看看这个matlab程序那里出错了 已有1人参与
|
||
|
用matlab拟合数据,进行NRTL模型拟合:我编写了如下的程序,一直出错,麻烦有懂的虫友帮忙看看,怎么改错?? (一)定义.m文件。 function g4=f(beta0,x1,x2,T,R) g1=beta0(1); g2=beta0(2); g3=beta0(3); g4=beta0(4); g4=x2.*x2.*((((g(1)./(R.*T)).*(exp(-g(3).*g(1)./(R.*T))).^2)./((x1+(exp(-g(3).*g(1)./(R.*T))).*x2).^2))+(((g(2)./(R.*T)).*(exp(-g(3).*g(2)./(R.*T))).^2)./((x2+(exp(-g(3).*g(2)./(R.*T))).*x1).^2))) (二)编写程序。 x1=[0.01525 0.02059 0.02685 0.03417 0.04221 0.04958]; x2=[0.98475 0.97941 0.97315 0.96583 0.95779 0.95042]; T=[298.15 303.15 308.15 313.15 318.15 323.15]; R=[8.314 8.314 8.314 8.314 8.314 8.314]; beta0=[0,0,0,0]; [g,resnorm]=lsqcurvefit(@f,beta0,x1,x2,T,R) 运行后出错: Warning: Length of lower bounds is > length(x); ignoring extra bounds. > In checkbounds at 27 In optim\private\lsqncommon at 39 In lsqcurvefit at 149 In Untitled2 at 6 Warning: Length of upper bounds is > length(x); ignoring extra bounds. > In checkbounds at 37 In optim\private\lsqncommon at 39 In lsqcurvefit at 149 In Untitled2 at 6 Exiting due to infeasibility: 4 lower bounds exceed the corresponding upper bounds. g = 0 0 0 0 resnorm = [] |
» 猜你喜欢
40+中年人失业后,还能找到好工作吗?
已经有11人回复
用NBS溴化时溶剂除了CCl4外还有什么
已经有6人回复
申请科研项目纯靠实力能成功吗?
已经有11人回复
极限拉扯,如何抉择
已经有15人回复
二审4个多月了还是Awaiting Reviewer Scores
已经有4人回复
OpenAI又攻克数学难题了,离AI做有机合成还有多远?
已经有13人回复
课题组会帮你通过考核么?
已经有7人回复
售一区SCI文章T0P,我:8O.551.O54,科目全,可十急
已经有9人回复
售SCI一区T0P文章,我:8.O55.1.O.54,科目全,可十急
已经有8人回复
售SCI一区文章,我:8O5.5.1.O5.4,科目全,可伽急
已经有10人回复
4楼2017-07-09 17:49:43
2楼2017-07-09 17:29:24
3楼2017-07-09 17:49:08
5楼2017-07-09 18:04:44










回复此楼

200