How to solve differential equation system?

2 ビュー (過去 30 日間)
c4ndc
c4ndc 2016 年 10 月 5 日
回答済み: c4ndc 2016 年 11 月 4 日
Hello, I want to learn how can i write a code for the solution of differential equations below? What is the matrix form of this system?
I tried different ways but I can't overcome it. Thanks for help.

回答 (2 件)

Pritesh Shah
Pritesh Shah 2016 年 10 月 5 日
Try
doc ode45 in matlab command. You will get examples.
  1 件のコメント
c4ndc
c4ndc 2016 年 10 月 5 日
編集済み: c4ndc 2016 年 10 月 5 日
Thank you for your answer. I looked this documentation but I'm newbie on MATLAB. So, I need more basic way.
function dNdt = rhs(t,N,par)
dNdt = zeros(length(N),1);
nk = length(N)/par.n;
for i = 1 : par.n
for k = 1 : nk
for j = i : par.n
for l = 1 : par.n
dNdt((i-1)*nk + k) = dNdt((i-1)*nk + k) + beta(j,l) * b(i,k,j,l) * S(j,k) * N((j-1)*nk + k) - S(i,k) * N((i-1)*nk + k);
end
end
end
end
I used above code with my friends help but I didn't succeed.

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


c4ndc
c4ndc 2016 年 11 月 4 日
Sorry, is there anybody to explain how can I use ode45?

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by