first order linear differential equation
3 次查看(过去 30 天)
显示 更早的评论
Does anybody know, how we can write a code to solve a specific ODE?
Thanks
0 个评论
回答(1 个)
Walter Roberson
2015-6-13
Have a look at the documentation for ode45().
Generally speaking you provide a function handle to a function in two parameters, the first of which is time. The second parameter is generally a vector the same length as the number of derivatives involved, and provides the boundary condition values at the initial time (I do not know yet how to handle the situation where the boundary conditions are stated in terms of different times.) The function should return the derivatives at the current time.
See the documentation for examples.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!