Solve differential equation using ode23 and ode45
Mostrar comentarios más antiguos
Question: solve the differential equation
regarding y as the independent variable rather than x. Also find solution for x(0)=1. Finally plot y vs x(y). Also use ode23 and ode45 to solve the equation and plot again.
My approach:
code:
syms x(y);
eqn=diff(y,x)==(x+y*exp(y));
cond=x(0)==1;
dsolve(eqn,cond)
But now how to use ode23 or ode45 and how to plot? Any solution will be appreciated .
Thanks in advance .
3 comentarios
Star Strider
el 24 de Jun. de 2019
This does not appear to be the same expression as the one you posted in LaTeX:
eqn=diff(x,y)==(x+y*exp(y));
One of them is in error.
emonhossain roy
el 24 de Jun. de 2019
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Ordinary Differential Equations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!