| f津津有味revision_Hosein_paper |
| % %的输入 |
| tspan =
0,10
;%时间跨度 |
| x0 = 1;%初始条件 |
| Delta_t = 10;%△时间(不等于tspan多级) |
| 点= 100;%的时间点来评估每个三角洲 |
| % % EMHPM算法提出的解决方案的应用 |
|
t1, z1
= Semhpm (@he_stable tspan x0, Delta_t,点);% EMHPM由他”年代的解决方案 |
|
t2, z2
= Semhpm (@hn_unstable tspan x0, Delta_t,点);% EMHPM Hosein Nia”年代的解决方案 |
|
t3, z3
= Semhpm (@od_taylor tspan x0, Delta_t,点);%由Odibat EMHPM”年代的解决方案 |
|
t4, z4
=数值(@numeric tspan, x0);%计算数值解 |
| % %显示计算机的阴谋 |
| 情节(t1, z1,”- - - - - -- - - - - -”t2 z2,”:”、t3、z3”-。”、t4、z4”- - - - - -”); |
| 传奇(”他- - - - - -∖ity_2”,”侯赛因Nia et al .,∖ity_2”,”Odibat -∖ity_4”,”数值,数值”); |
| ylabel (”位移,∖财年”),包含(t”);轴(
0 10 0 2
) |
| % %的解决方案定义 |
| 函数dydt =数字(t, y) %数值解 |
| dydt (1,1) = y (1* y () exp (t)。1)∧2; |
| 函数y = he_stable (t, x0, t) %同伦/多级不稳定,他”年代的解决方案 |
| y0 = x0 * exp (t); |
| 日元= 5 * x0∧2 * (exp (t) exp (3 * t)); |
| y2 = 0。25 * x0∧2 * 3 * (exp (t) exp (3 * t) + exp (5 * t)); |
| y = y0 + y1 + y2; |
| 函数y = hn_unstable (t, x0, t) %同伦/多级稳定,侯赛因Nia”年代的解决方案 |
| y0 = x0 * exp (- t); |
| 日元= (2 * x0-x0∧2)* t。* exp (- t); |
| y2 = (2 * x0-3 * x0∧2 + x0∧3)。* t。∧2 . * exp (- t); |
| y = y0 + y1 + y2; |
| 函数y = od_taylor (t、c、t) %同伦/多级泰勒展开式,Odibat”年代的解决方案 |
| y0 = c; |
| 日元=(碳碳。∧2)* t; |
| y2 = (c。∧3 - 2 * c。∧2 + c / 2) * t。∧2; |
| y3 = (- c。∧4 + 3 * c。∧3-13 * c。∧2/6 + c / 6) * t。∧3; |
| y4 = (c。∧5 - 4 * c。∧4 + 29 * c。∧3/6-5 * c。∧2/3 + c / 24) * t。∧4; |
| y = y0 + y1 + y2 + y3 + y4; |
| % %提高多级同伦摄动方法 |
| 函数
t, z
= Semhpm(濒死经历tspan、z0 Deltat, pnt) |
| tini = tspan (1);tfin = tspan(结束);tstart = tini; |
| tini = tini-tstart;tfin = tfin-tstart; |
| 如果tini = = tfin |
| 错误(”最后进入tspan必须不同于第一项。”); |
| elseif abs (tini) > abs (tfin) |
| tspan = flipud (fliplr (tspan));tini = tspan (1);tfin = tspan(结束); |
| 结束 |
| tdir =符号(tfin-tini); |
| 如果任何(tdir * diff (tspan) < = 0) |
| 错误(”tspan必须严格增加或减少的条目。”); |
| 结束 |
| incT = Deltat / pnt; |
| z (1) = z0”;t (1)= tini; |
| iteT = 2; |
| t (iteT) = tini + incT * tdir;%实时 |
| 虽然tdir * t (iteT) < tdir * (tfin + tdir * incT) |
| P_act =装天花板(.99999 * (t (iteT) -tini) * tdir / Deltat);%下一子区间 |
| c = z ((Deltat / incT) * (P_act-1) + 1:);%初始条件 |
| tsub (iteT-1) = t (iteT)——(P_act-1) * Deltat * tdir;%转移时间 |
| temp = tsub (iteT-1); |
| z (iteT:) =濒死经历(临时c tstart + t (iteT));%评估解决方案 |
| 如果tdir * t (iteT) > = tdir * tfin * 0.99999 |
| 打破%最后子区间 |
| 其他的 |
| iteT = iteT + 1; |
| t (iteT) = tini + (iteT-1) * incT * tdir;%下一子区间 |
| 结束 |
| 结束 |
| t =”+ tstart; |