trajode.m

来自「nn modelling and auto-pid controller」· M 代码 · 共 26 行

M
26
字号
function zdot = trajODE(t, z, flag, sigma)% zdot = trajODE(t, z, sigma)%% implements the optimal trajectories for the game of two identical cars%	equations (2)%% draws on A.W.Merz, "The Game of Two Identical Cars", pp.324 -- 343%	Journal of Optimization Theory and Applications, 9, 5 (1972)%% Ian Mitchell for HS'01, 1/16/01reverseTime = 1;sigma1 = sigma(1);sigma2 = sigma(2);x = z(1);y = z(2);theta = z(3);xdot = -sigma1 * y + sin(theta);ydot = -1 + sigma1 * x + cos(theta);thetadot = -sigma1 + sigma2;zdot = (reverseTime * -1) * [ xdot; ydot; thetadot ];

⌨️ 快捷键说明

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