% Shooting demonstration
% CCK 2009-Mar-12
%
% NOTE: Had to install octave-forge-optim to get fzero.
function shoot(vguess)

hold off
miss(vguess,'b-+');
hold on % overplot all the misses


vbest = fzero(@miss, vguess)

% Adjust the axes for a nice plot.
axis([-10,10,0,10])
axis equal

miss(vguess,'b-+');
miss(vbest,'g-x');
plot(0,3,'bo');
title('Three Point Field Goal','fontsize',20)
hold off