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
 Fall '11
 Dr.Robin
 Continuous function, Category theory, Morphism, Homomorphism, true solution, yprime

Click to edit the document details