%Solve BVP
%for simple ODE y''=-4
% plot y(t);

solinit = bvpinit(linspace(0,1,5),[2 -2]);
sol = bvp4c(@bvp_def,@bvp_bc_def,solinit);

%options = bvpset('RelTol',1e-4,'AbsTol',1e-5);
figure(1);
x = linspace(0,1);
y1 = deval(sol,x);
plot(x,y1(1,:),'b');
xlabel('time');
ylabel('height and speed');
hold on;
plot(x,y1(2,:),'r');

return;
