   function [thi,theta,time] = newt(t_0,speed,height)

%-------------------------------------------------------
% function [thi,theta,time] = newt(t_0,speed,height)
%
%
%
%
%-------------------------------------------------------

error    = .001;
u        = [t_0+.5; atan(2); pi/4];

fname     = 'func_of_x';
test_name = 'test';

fc   = feval(fname,u(3,1),u(2,1),u(1,1),t_0,speed,height);
test = feval(test_name,u(3,1),u(2,1),u(1,1),t_0,speed,height);

while (abs(test(1,1)) > error | abs(test(2,1)) > error | abs(test(3,1)) > error) 

  u   = u + fc;

  fc   = feval(fname,u(3,1),u(2,1),u(1,1),t_0,speed,height);
  test = feval(test_name,u(3,1),u(2,1),u(1,1),t_0,speed,height)

end

time  = u(1,1);
theta = u(2,1);
thi   = u(3,1);
