许可优化
许可优化
产品
产品
解决方案
解决方案
服务支持
服务支持
关于
关于
软件库
当前位置:服务支持 >  软件文章 >  Matlab ODE事件函数详解:微分方程事件位置检测

Matlab ODE事件函数详解:微分方程事件位置检测

阅读数 3
点赞 0
article_banner

限制性三体问题的方程为

f87ad90998027c5ec7bda13afb0a37a9.png

其中

f50b34c47600862d588f5590dc83d9c7.png

前两个解分量是微小物体的坐标,因此针对一个分量绘制另一个分量可以得到物体的轨迹。

orbitode.m 中嵌套的事件函数将搜索两个事件。一个事件查找距离起点最远的点,另一个事件查找宇宙飞船返回到起点的点。即使积分器使用的步长并非通过事件位置确定,也会准确定位事件。在此示例中,指定过零方向的功能非常重要。返回到起点的点和距离起点最远的点具有相同的事件值,并由交叉方向来区分这两个点。为此行为编码的事件函数为

function [value,isterminal,direction] = orbitEvents(t,y)

% dDSQdt is the derivative of the equation for current distance. Local

% minimum/maximum occurs when this value is zero.

dDSQdt = 2 * ((y(1:2)-y0(1:2))' * y(3:4));

value = [dDSQdt; dDSQdt];

isterminal = [1; 0]; % stop at local minimum

direction = [1; -1]; % [local minimum, local maximum]

end

键入 orbitode 以运行该示例。

orbitode

This is an example of event location where the ability to

specify the direction of the zero crossing is critical. Both

the point of return to the initial point and the point of

maximum distance have the same event function value, and the

direction of the crossing is used to distinguish them.

Calling ODE45 with event functions active...

Note that the step sizes used by the integrator are NOT

determined by the location of the events, and the events are

still located accurately.

d6249f0c25ec6172322159b6e646deb2.png

6c99cdb40bc598acb2fb64b7797e6802.png


免责声明:本文系网络转载或改编,未找到原创作者,版权归原作者所有。如涉及版权,请联系删

相关文章
技术文档
QR Code
微信扫一扫,欢迎咨询~
customer

online

联系我们
武汉格发信息技术有限公司
湖北省武汉市经开区科技园西路6号103孵化器
电话:155-2731-8020 座机:027-59821821
邮件:tanzw@gofarlic.com
Copyright © 2023 Gofarsoft Co.,Ltd. 保留所有权利
遇到许可问题?该如何解决!?
评估许可证实际采购量? 
不清楚软件许可证使用数据? 
收到软件厂商律师函!?  
想要少购买点许可证,节省费用? 
收到软件厂商侵权通告!?  
有正版license,但许可证不够用,需要新购? 
联系方式 board-phone 155-2731-8020
close1
预留信息,一起解决您的问题
* 姓名:
* 手机:

* 公司名称:

姓名不为空

姓名不为空

姓名不为空
手机不正确

手机不正确

手机不正确
公司不为空

公司不为空

公司不为空