Question about bvp4c solution
1 view (last 30 days)
Show older comments
I used bvp4c to solve second order differential equation: A*y'' = f(y), now I want to get some special values from the solutions. How to get the values of y'' and y' from each point?
0 Comments
Accepted Answer
Torsten
on 4 May 2015
If you solved your equation by solving the System
y1'=y2
y2'=f(y)/A,
you can get y' and y'' by
yp=deval(sol.yp,sol.x);
plot(sol.x,yp(1,:),sol.x,yp(2,:));
Here, yp(1,:)=y' and yp(2,:)=y''.
Best wishes
Torsten.
2 Comments
Torsten
on 5 May 2015
You must call deval with the solution obtained by bvp4c.
Thus
sol=bvp4c(...);
yp=deval(sol.yp,sol.x);
Best wishes
Torsten.
More Answers (0)
See Also
Categories
Find more on Boundary Value Problems 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!