Question: using Matlab please help solving this problem < comments needed Edmond Halley (the astronomer famous for discovering Halleys Comet) invented a fast algorithm for computing

using Matlab please help solving this problem< comments needed

Edmond Halley (the astronomer famous for discovering Halleys Comet) invented a fast algorithm for computing the square root of a number, A. Halleys algorithm approximates as follows:

Start with an initial guess x1. The new approximation is then given by

These two calculations are repeated until some convergence criteria, ?, is met.

(a) Write a MATLAB function called my_sqrt that approximates the square root of a number. It should have two inputs, the initial guess and the convergence criteria.

(b) Test your function by approximating the square root of 5 and comparing it to the value calculated with the built-in MATLAB function, sqrt.

(c)Did the my_sqrt function match the sqrt result?

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!