如何模拟具有自适应步长大小的MATLAB中的离散ODE?
我有一个离散的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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论