| 查看: 319 | 回复: 0 | ||
[求助]
用1stopt迭代求参数,求高手帮我看看代码哪里有问题,谢谢
|
|
我是菜鸟一个,昨天才接触1Stopt,更加不会pascal语言。想迭代求解参数,使方程值最小。但是,点了“执行”后确没有啥反应。我用的1.5pro版本。跪求高手指点!谢谢 algorithm=5par_retrieval ; constant theta(1:9)=[30,32.5,35,37.5,40,42.5,45,47.5,50] ; constant TBh_obs(1:9)=[241.17748,240.65136,239.83198,238.66749,237.10444,235.08808,232.56285,229.47270,225.76159] ; constant p=0.01744,mus=0.1; parameter eb[3,30],tau[0,1.0],omega[0,0.5],rms[0.0025,0.03],cl[0.05,0.5]; minimum; startprogram [pascal]; procedure mainmodel; var i:integer; tt:array[1..9] of double; Ah:array[1..9] of double; Bh:array[1..9] of double; Ch:array[1..9] of double; rh:array[1..9] of double; eh:array[1..9] of double; E_eff:array[1..9] of double; cf,temp:double; Begin cf:=0.0 tt[1]:=exp(-tau/COS(theta[1]*p)) ; rh[1]:=ABS((mus*COS(theta[1]*p)-SQRT(mus*eb-SIN(theta[1]*p)*SIN(theta[1]*p)))/(mus*COS(theta[1]*p)+SQRT(mus*eb-SIN(theta[1]*p)*SIN(theta[1]*p))))^2; Ah[1]:=0.068502*(theta[1]*p)^2 -0.058486*(theta[1]*p) +0.976321; Bh[1]:=-0.051377*(theta[1]*p)^2 +0.014978*(theta[1]*p) +0.045456 ; Ch[1]:=0.601618*(theta[1]*p)^2 -0.151848*(theta[1]*p) -0.607679; eh[1]:=1-rh[1]*Ah[1]*exp(Bh[1]*(rms^2/cl)^2+Ch[1]*(rms^2/cl)) ; E_eff[1]:=eh[1]*tt[1]+(1-tt[1])*(1-omega)+(1-eh[1])*(1-omega)*(1-tt[1])*tt[1]; for i:=2 to 9 do begin tt:=exp(-tau/COS(theta*p)) ; rh:=ABS((mus*COS(theta*p)-SQRT(mus*eb-SIN(theta*p)*SIN(theta*p)))/(mus*COS(theta*p)+SQRT(mus*eb-SIN(theta*p)*SIN(theta*p))))^2; Ah:=0.068502*(theta*p)^2 -0.058486*(theta*p) +0.976321; Bh:=-0.051377*(theta*p)^2 +0.014978*(theta*p) +0.045456 ; Ch:=0.601618*(theta*p)^2 -0.151848*(theta*p) -0.607679; eh:=1-rh*Ah*exp(Bh*(rms^2/cl)^2+Ch*(rms^2/cl)) ; E_eff:=eh*tt+(1-tt)*(1-omega)+(1-eh)*(1-omega)*(1-tt)*tt; cf:=cf+(E_eff/E_eff[1]-TBh_obs/TBh_obs[1])^2 ; temp:=cf; end ; Functionresult:=temp ; End; Endprogram; |
» 猜你喜欢
求国际会议网站
已经有1人回复
求取一些关于纳米材料和纳米技术相关的英文PPT。
已经有0人回复
物理学I论文润色/翻译怎么收费?
已经有123人回复
【复旦大学】二维材料方向招收2026年博士研究生1名
已经有0人回复
北京纳米能源与系统研究所 王中林院士/曹南颖研究员课题组2026级硕/博/博后招生
已经有10人回复
荷兰Utrecht University超快太赫兹光谱王海教授课题招收2026 CSC博士生
已经有22人回复
反铁磁体中的磁性切换:两种不同的机制已成功可视化
已经有0人回复
26申博推荐:南京航空航天大学国际前沿科学研究院光学方向招收博士生!
已经有0人回复
求标准粉末衍射卡号 ICDD 01-076-1802
已经有0人回复
找到一些相关的精华帖子,希望有用哦~
急求高手帮写个matlab程序拟合参数求动力学方程。
已经有4人回复
matlab数据拟合求助!!希望高手帮忙写一下matlab的程序 谢谢了!!
已经有15人回复
哪位能用1stopt的高版本帮我走个模型啊!谢谢了!我的1.5的不能跑两模型共参数啊
已经有3人回复
哪位大哥能帮我用1stopt3.0以上版本跑一个拟合程序
已经有11人回复
用1stopt进行数据拟合时,无法运行sharedmodel ,求助高手
已经有7人回复
【求助】求教matlab解非线性方程组
已经有9人回复
科研从小木虫开始,人人为我,我为人人













回复此楼
点击这里搜索更多相关资源