问题描述
我需要使用Simulink解决此ODE,但我不知道如何制作.我只知道如何使用ODE求解器来做到这一点.
I need to solve this ODE using Simulink and I don't know how to make it.I only know how to do it using ODE solvers.
y'' - y' - 2y = e^(3x)
y(0)=1, y'(0)=2.
我重新编写了获得ODE的方程式:
I rewrote the equation obtaining an ODEs:
y' = f(x,y)
y(x0) = y0
y'1 = y2
y2= e^(3*x) + y' + 2y
使用ODE求解器.
如果有人可以帮助我使用Simulink模型解决此问题,
If someone can help me to solve this using a Simulink Model I would appreciate it.
我知道如何在Matlab中使用ODE求解器作为ode23和ode23s来解决它,但我不知道如何使用Simulink模型来解决它.
I know how to solve it in Matlab using ODE solvers as ode23 and ode23s but I don't know how to do it using a Simulink Model.
预先感谢
推荐答案
您能以封闭形式解决它吗?对我来说看起来可行.我建议任何人在可能的情况下都可以找到答案,然后再开始数值解决方案.
Can you solve it in closed form? Looks doable to me. I advise anyone to have the answer in hand if possible before you start a numerical solution.
这就是我得到的.检查我:
Here's what I get. Check me:
y(x) = e^(-x)*(8e^3x + 3e^4x + 1)/12
Wolfram Alpha 说的是正确的.
(注意:x值较大的问题-此响应将以e ^ 3x的速率增长.)
(Note: Trouble for large values of x - this response will grow at e^3x rate.)
您需要将此表达为一组耦合的一阶ODE.
You need to express this as a set of coupled first order ODEs.
y' = z
z' = z + 2y + e^(3x)
边界条件变为:
y(0) = 1
z(0) = 2
这篇关于在Matlab中使用Simulink解决ODE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!