MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [MATLAB基础] 带有事件的微分方程组的数值积分问题 (https://www.labfans.com/bbs/showthread.php?t=13304)

sxgyjq 2011-05-03 17:03

带有事件的微分方程组的数值积分问题
 
在编写带有事件的微分方程组的积分问题时,
构造一个事件函数如下
function [value,isterminal,direction] = event1(t,qdq,ddq)
if qdq(1)==1
same_state=0;
else
same_state=1;
end
value=same_state;
isterminal=1;
direction=0
end
调试过程中发现same_state=0,为什么程序没有终止数值积分?

请前辈们不吝赐教,感激不尽!


所有时间均为北京时间。现在的时间是 11:16

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.