2nd order ode where the user inputs the ode
信息
此问题已关闭。 请重新打开它进行编辑或回答。
显示 更早的评论
hello everyone,
I'm trying to write a code that solves 2nd order odes, and the user inputs the ode
i tried this but it doesn't work:
syms x y
a=input('introduce your ode')%using diff and ==
syms y(x)
ysol=dsolve(a,y(0)==1)
1 个评论
Geoff Hayes
2018-11-21
chakib - please clarify what you mean by it doesn't work (for those of us who can't run the above code since we don't have the Symbolic Toolbox). If you are observing an error message, then please copy and paste the full error message to this question.
回答(1 个)
madhan ravi
2018-11-21
编辑:madhan ravi
2018-11-21
Try the below it works:
syms y(x)
a=input('introduce your ode : ')
ysol=dsolve(a,y(0)==1)
0 个评论
此问题已关闭。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!