How to use ode45 to solve a system with many dimensions?
2 次查看(过去 30 天)
显示 更早的评论
Hi there,
I meet a interesting question——How to simulate a system with 100 dimensions using ode45?
Obviously, it's impossible to write all equations as below:
dx(1)=x(1)*(α(1)-a(1,1)*x(1)-a(1,2)*x(2)...)
dx(2)=x(2)*(α(2)-a(2,1)*x(1)-a(2,2)*x(2)...)
...
dx(100)=x(100)*(α(100)-a(100,1)*x(1)-a(100,2)*x(2)...)
Does there exist any tricks to solve this questions?
Looking forward to any suggestions~
0 个评论
采纳的回答
James Tursa
2017-6-9
If I understand your equations correctly, simply
dx = x .* (alpha - a*x);
2 个评论
Walter Roberson
2017-6-10
An error like that can be caused by using
ode45(MyFunc, .....)
instead of
ode45(@MyFunc, .....)
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!