multilinear2ad.m

来自「计算动力学系统的分岔图」· M 代码 · 共 40 行

M
40
字号
function ytayl2 = multilinear2AD(func,q1,q2,x0,p1,n) %----------------------------------------------------% This file computes  B^(n)*q1*q2 using automatic differentiation, where %B^(n) is the second order derivatives  of map f^(n). %---------------------------------------------------- taylorder=2; if q1==q2       y1=Bvv(func,x0,q1,p1,taylorder,n); else        y11=Bvv(func,x0,q1+q2,p1,taylorder,n);        y12=Bvv(func,x0,q1-q2,p1,taylorder,n);        y1=1/4.0*(y11-y12); endytayl2=2*tcs(y1);%--------------------------------------------------function y1 = Bvv(mapsf,x0,hc,p1,taylorder,n)   % Convert to "active" variables:   s = adtayl(0,taylorder);%Base point & Taylor order   y1= x0 + s.*hc; for i=1:n            y1 = mapsf(0, y1,p1{:}); end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?