%%%%%%%%%%%%%%%%%%%%%%% main.m %%%%%%%%%%%%%%%%%%%%%%%% function main() % main compute's approximations of sqrt(5) by Newton's method and outputs a % table of calculations. % main asks the user to input an initial guess and a number of iterations % main calls (the user-defined function) NewtonAlg5 for Newton's method and % it calls TabulateForNewtonAlg to print the table. %------------------------------------------------------------------------- % User inputted initial guess RootGuess=input('Enter an initial guess for sqrt(5): '); % User inputted number of iterations MaxIter=input('How many interations of Newton''s method shall we use: '); % Our current implemetation of Newton's method VecOfApproximations=NewtonAlg5(RootGuess, MaxIter); % To print the numerical results from Newton's method TabulateForNewtonAlg(VecOfApproximations); return