How to solve simultaneous Ordinary Differential Equation

6 views (last 30 days)
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

Accepted Answer

Torsten
Torsten on 28 Jul 2017
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.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!