Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试输入一个二阶微分方程,以通过 x = 0 到 x =1 求解到 matlab 中。我不知道怎么做。这是等式:
y'' = 1 + 0.1 \sqrt{1+(y')^2}
初始条件为零。
通常,您通过转换为一阶方程组来求解高阶方程。在这里,您将定义:
y' = v v' = 1 + 0.1 \sqrt{1 + v^2}
定义一个计算右手边的函数,并使用ode45.
ode45
请注意,这个方程也可以在封闭形式中轻松求解,因此应该是一个很好的测试方法。