Solve differential equation using ode23 and ode45
Mostra commenti meno recenti
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 Commenti
Star Strider
il 24 Giu 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
il 24 Giu 2019
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Ordinary Differential Equations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!