Question: 3) The divide and average method, an ancient method for approximating the square root of any positive number a, can be formulated as X new

3) The divide and average method, an ancient method for approximating the square root of any positive number a, can be formulated as X new Xold + a/Xold 2 Write an MATLAB function, DivideAndAverage.m, using a while-end loop structure to implement this algorithm. At each step estimate the error in your approximation as: Xner Lold = Inew Repeat the loop until e is less or equal to a specified value, accuracy. Design your function have input arguments a, Xold and accuracy and to compute both the estimated square root and the error. Test your function using a = 5, Xold 2 and accuracy = 0.0001. =
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
