solving coupled differential equations.

i need help to solve the couple differential equation of the following type

 採用された回答

Torsten
Torsten 2017 年 11 月 9 日
編集済み: Torsten 2017 年 11 月 9 日

1 投票

Use one of the solvers from the ODE-suite to solve:
https://de.mathworks.com/help/matlab/math/choose-an-ode-solver.html
Best wishes
Torsten.

4 件のコメント

imran saeed
imran saeed 2017 年 11 月 9 日
i use ode45 to solve i can solve for small number of equations. but i need to solve at least 50 coupled equations. system of equations is as follow can you give some guidance. i can solve simple equations using ode45 but this is very complicated.
Torsten
Torsten 2017 年 11 月 9 日
編集済み: Torsten 2017 年 11 月 9 日
function dz = fun(t,z)
x=z(1:50);
y=z(51:100);
dx=zeros(50,1);
dy=zeros(50,1);
for i=1:50
for j=1:50
if j==i
continue
end
dx(i)=dx(i)+((y(i)-y(j))^2-(x(i)-x(j))^2)/((y(i)-y(j)^2+(x(i)-x(j))^2)^2;
dy(i)=dy(i)+(y(i)-y(j))*(x(i)-x(j))/((y(i)-y(j))^2+((x(i)-x(j))^2))^2;
end
end
dz=[dx;dy];
Best wishes
Torsten.
imran saeed
imran saeed 2017 年 11 月 9 日
thank you very much for your help
imran saeed
imran saeed 2017 年 11 月 9 日
it worked beautifully

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange상미분 방정식 についてさらに検索

タグ

質問済み:

2017 年 11 月 9 日

コメント済み:

2017 年 11 月 9 日

Community Treasure Hunt

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

Start Hunting!