How to solve simultaneous Ordinary Differential Equation

7 ビュー (過去 30 日間)
Dan Mathotaarchchi
Dan Mathotaarchchi 2017 年 7 月 28 日
回答済み: Torsten 2017 年 7 月 28 日
Hi all. Can anyone help me to generate code to solve this problem. this is simultaneous first order ODE with codes . Assumptions can be made wherever necessary Thanks

採用された回答

Torsten
Torsten 2017 年 7 月 28 日
k1 = ...; % set constant k1
k2 = ...; % set constant k2
k3 = ...; % set constant k3
f = @(t,y)[9-k1*y(2)^2*y(1)+k2*y(1)^2 ; k3*y(2)^2+y(1)*y(2)]; % define differential equations
tspan = [0 20]; % set interval of integration
u0 = ...; % set initial condition for u
omega0 = ...; % set initial condition for Omega
y0 = [u0 ; omega0]; % set vector of initial values
[T Y] = ode45(f,tspan,y0); % call integrator
plot(t,y(:,1),'-o',t,y(:,2),'-o') % plot results
Best wishes
Torsten.

その他の回答 (0 件)

カテゴリ

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