我想将其他参数传递给 MATLAB 中的 ode45 函数。这方面已经有很多问题了,但我的函数中也有一个“标志”参数。
function [xdot,isterminal,dircn]=spp(t,x,flag,f)
通常,在调用 ode45 时,如果 spp 没有标志参数,则类似这样的操作会起作用。
options=odeset('RelTol',1e-13,'AbsTol',1e-14,'events','on');
[t,x,te,xe,ie]=ode45(@(t,x)spp(t,x,f),[0 2*pi/OMEG],[xin;xdin],options);
我四处寻找,但找不到解决方案。请帮帮我。