Question: Matlab The divide and average method can be used to approximate the squareroot of a positive number, a. In this method, the user supplies an
The "divide and average" method can be used to approximate the squareroot of a positive number, a. In this method, the user supplies an initial guess for the squareroot , x. The guess is improved by updating x using the following formula N times: x = x + a/x/2 Write a MATLAB script that implements this algorithm for user supplied values of a, x, and N. Test your script for various values of x and N and compare to the built-in squareroot function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
