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.
1 个评论
Walter Roberson
2013-2-17
Please read the guide to tags and retag this question. http://www.mathworks.co.uk/matlabcentral/answers/43073-a-guide-to-tags
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
类别
在 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!