function z=BVPSample(s) % This function creates the error for a boundary value problem: % y''=4y, y(0)=1 and we want y(1)=3. The input s is the initial % velocity. [t,y]=ode45(@BVPeqn,[0,1],[1;s]); z=y(end,1)-3;