Question: The divide and average method, an old - time method for approximating the square root of any positive number a can be formulated as x

The "divide and average" method, an old-time method for approximating the square root of any positive
number a can be formulated as
xi=xi-1+axi-12
Design a function that accepts a, es, and maxlterations to implement this method. Use a while loop to
calculate the root approximation xi with the stopping criterion s or iteration maxiterations. Assume the
initial value of xi to be a2. Estimate the error in your approximation as:
=|xnew-xoldxnew|
Return the final root approximation, ea, and iter. Test your function with a=25, es =0.001, and maxiterations
=50.
output:
xi=5
ea =
3.355538069627073e-10
iter =6)
PLease find matlab code to have the same as the output
 The "divide and average" method, an old-time method for approximating the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!