Solve differential equation using ode23 and ode45
显示 更早的评论
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 个评论
Star Strider
2019-6-24
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
2019-6-24
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!