y''-y' y=sin(x) +exp(x)
1 view (last 30 days)
Show older comments
thang phung
on 27 Dec 2017
Commented: Star Strider
on 28 Dec 2017
I do not know how to solve it if I do not use dsolve
5 Comments
Accepted Answer
Star Strider
on 27 Dec 2017
They are different because odeToVectorField gives you an array you can pass to matlabFunction that will give you an anonymous function you can use directly with ode45 (if you write the matlabFunction call correctly), to get a numeric solution.
The result of your dsolve call gives you the analytic solution to the differential equation.
They are two entirely different results.
4 Comments
More Answers (0)
See Also
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
