| 查看: 364 | 回复: 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; |
» 猜你喜欢
【修正版】单环用磁约束低速电子实验方案(简化版)
已经有0人回复
桂林理工大学物理学专业招收调剂,还有三个名额!!!
已经有22人回复
物理学I论文润色/翻译怎么收费?
已经有132人回复
考博自荐
已经有4人回复
山东大学第二批博士研究生招生
已经有0人回复
中国科学院东莞材料科学与技术研究所-2026年博士招生-吴昊研究员-磁学与自旋电子学
已经有0人回复
《电磁学》教材推荐
已经有1人回复
【急招】合肥工大核聚变材料计算方向2026级工程博士生
已经有4人回复
大豆异黄酮分离
已经有0人回复
湖南大学材料学院急招2026年博士生,临时增加一名博士联培指标
已经有10人回复
天津理工大学晶体材料全国重点实验室刘红军教授课题组招收博士生1-2名
已经有0人回复
找到一些相关的精华帖子,希望有用哦~
急求高手帮写个matlab程序拟合参数求动力学方程。
已经有4人回复
matlab数据拟合求助!!希望高手帮忙写一下matlab的程序 谢谢了!!
已经有15人回复
哪位能用1stopt的高版本帮我走个模型啊!谢谢了!我的1.5的不能跑两模型共参数啊
已经有3人回复
哪位大哥能帮我用1stopt3.0以上版本跑一个拟合程序
已经有11人回复
用1stopt进行数据拟合时,无法运行sharedmodel ,求助高手
已经有7人回复
【求助】求教matlab解非线性方程组
已经有9人回复
科研从小木虫开始,人人为我,我为人人












回复此楼
点击这里搜索更多相关资源
精华III:
20