How to define simultaneous equations for ODE45
1 次查看(过去 30 天)
显示 更早的评论
Suppose I have equations
I understand I write
f=@(t,x,a)[x(1)+x(2),x(1)-a*x(2)]
But I hope to define equations one by one f1 and f2 and then combine into f. Please advise.
0 个评论
采纳的回答
madhan ravi
2020-5-30
f1 = @(t,x) x(1) + x(2)
f2 = @(t,x,a) x(1)-a*x(2)
F = @(t,x,a) [f1(t,x);f2(t,x,a)]
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!