MATLAB: Question about bvp4c solution

bvp4cdifferential equationsnumerical calculation

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?

Best Answer

  • 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.