ODE45 for a second order differential equation
显示 更早的评论
I have a second order differential equation : y''=(2*y)+(8*x)*(9-x); Boundary Conditions y(0)=0 , y(9)=0 Need to solve the diff eq using ode45.
I've tried watching a bunch of tutorials but I just cannot seem to figure out how the function is written as a column vector [y';y'']. I don't understand it at all and that might make this query vague too.
Hope someone can help with the code or the explanation on how to solve the above.
Thank you
采纳的回答
更多回答(2 个)
Hi,
transform a n-th order ode into a system of n 1st order ode's to solve it.
Matlab documentation example: https://de.mathworks.com/help/matlab/math/solve-nonstiff-odes.html
If you read this i guess you can quickly solve your problem.
2 个评论
Remston Martis
2018-4-23
编辑:Remston Martis
2018-4-23
Ebraheem Menda
2021-6-30
编辑:Ebraheem Menda
2021-6-30
In this case you have declared the name of the function and its output both with the same name 'fun'. That is the problem it seems.
NARSIRAM GURJAR
2019-9-16
0 个投票
C:\Users\remst\Desktop\ode45.m
save this file with different name
类别
在 帮助中心 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!