This preview shows page 1. Sign up to view the full content.
Unformatted text preview: [t,y] = ode45(@yprime,[0,1],[1,z]); % The true solution is . .. utrue = cos(pi*t/2) + t.^2; plot(t,y(:,1),t,utrue) legend(Computed solution,True solution) xlabel(t) ylabel(u) % end of solvebvp %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function f = evalshoot(z) % Given a value for y(2) at time t=0, see how close...
View
Full
Document
This note was uploaded on 01/21/2012 for the course MAP 3302 taught by Professor Dr.robin during the Fall '11 term at University of Florida.
 Fall '11
 Dr.Robin

Click to edit the document details