How to solve simultaneous Ordinary Differential Equation
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Dan Mathotaarchchi
el 28 de Jul. de 2017
Respondida: Torsten
el 28 de Jul. de 2017
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

0 comentarios
Respuesta aceptada
Torsten
el 28 de Jul. de 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.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Ordinary Differential Equations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!