如何模拟具有自适应步长大小的MATLAB中的离散ODE?

发布于 2025-01-24 02:33:42 字数 524 浏览 2 评论 0原文

我有一个离散的ode,其中u是输入,y是输出,y 。

dy = @(y, u) 229.888852 - 0.050251*y + 3.116311*u + 0.000075 * y^2

我想用ode-solver Eg ode45模拟此系统。但是ode45重新Quries time vector t例如

tspan = [0 5];
y0 = 0;
[t,y] = ode45(@(t,y) 2*t, tspan, y0);

,我在离散ode中没有t。我发现很难在MATLAB /八度中使用ode45或其他ode-solvers,因为它们无法处理离散的ODE。

我的问题很简单:

如何模拟具有自适应步长的MATLAB中的离散颂歌?

I have a discrete ODE, where u is the input and y is the output and dy is the derivative of y.

dy = @(y, u) 229.888852 - 0.050251*y + 3.116311*u + 0.000075 * y^2

I want to simulate this system with a ODE-solver e.g ODE45. But ODE45 requries a time vector t e.g

tspan = [0 5];
y0 = 0;
[t,y] = ode45(@(t,y) 2*t, tspan, y0);

And I don't have the t in my discrete ODE. I found it difficult to use ODE45 or other ODE-solvers in MATLAB / Octave because they don't handle discrete ODE's.

My question is simple:

How to simulate a discrete ODE in MATLAB with adaptive step size?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文