I want to solve some coupled differential equations using ode45, but here I have to pass some constants in that function as well. How will the code be written.

1 次查看(过去 30 天)
I want to solve some coupled differential equations using ode45, but here I have to pass some constants in that function as well. How will the code be written.

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2013-2-17
编辑:Azzi Abdelmalek 2013-2-17
function dy=yourfunction(t,y,k,g) % k, g are your constants
%your code
To call ode45
[t,y]=ode45(@(t,y) yourfunction(t,y,k,g),tspan,y0)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Ordinary Differential Equations 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by