Borrar filtros
Borrar filtros

solution of coupled first order odes numerically

1 visualización (últimos 30 días)
Sattik Basu
Sattik Basu el 20 de Jun. de 2018
Comentada: Sattik Basu el 26 de Jun. de 2018
eqn1 = coeff1*var1 + coeff2*diff(var1) + coeff3*var2 +coeff4*diff(var2) == 0;
eqn2 = coeff5*var1 + coeff6*diff(var1) + coeff7*var2 +coeff8*diff(var2) == 0;
bc1 = var1(0) == const1
bc2 = var2(0) == const2
i have all the coeffs defined as function handles. dsolve doesnt give solution as no explicit solution is present. How do i solve them numerically?
This can be easily done in Mathematica with NDSolve. However, i cant seem to think how i can appl oe45 or whatever is needed.

Respuesta aceptada

Torsten
Torsten el 21 de Jun. de 2018
Use the mass matrix option of the ODE solvers.
Or explicitly solve your equations for diff(var1) and diff(var2) (2 linear equations in 2 unknowns).
Best wishes
Torsten.
  1 comentario
Sattik Basu
Sattik Basu el 26 de Jun. de 2018
I ended up converting the system in a matrix form and solved them hassle free. This worked great with initial values.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Ordinary Differential Equations en Help Center y File Exchange.

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by