1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Leya [2.2K]
2 years ago
13

The "divide and average" method, an old-time method for approximating the square root of any positive number a, can be formulate

d as:
x= (x +a/x)/2

Write a well-structured M-file function based on the while...break loop structure to implement this algorithm. Use proper indentation so that the structure is clear. At each step estimate the error in your approximation as:

ε= |x^new- x^old/x^new|

Repeat the loop until ε is less than or equal to a specified value. Design your program so that it returns both the result and the error. Make sure that it can evaluate the square root of numbers that are equal to and less than zero. For the latter case, display the result as an imaginary number. For example, the square root of -4 would return 2i. Test your program by evaluating a = 0,2, 10 and-4 for ε = 10^-4

Engineering
1 answer:
Shalnov [3]2 years ago
4 0

Answer:

<u>note:</u>

find the attachment:

You might be interested in
I need help on the Coderz Challenge missions 3 part 3. PLEASE HELP!
allsm [11]

Answer:

the answer how you analyzs the problwm

6 0
3 years ago
Read 2 more answers
Situation: Peter is designing a new hybrid car that functions on solar power. He is currently working on sketches of his design
givi [52]

Answer:

whats the question?

Explanation:

8 0
2 years ago
A large fraction of the thermal energy generated in the engine of a car is rejected to the air by the radiator through the circu
Rina8888 [55]
Open system because there is mass (water) flowing through the system of interest (radiator)
5 0
3 years ago
One of the flaws in the engineers' reasoning for galloping gertie's design was that they attributed prior failures of suspension
Jlenok [28]
False i think it would be
3 0
2 years ago
Nanotechnology is a scientific area that deals with making or changing things that are incredibly _______________. *
Dafna1 [17]
B tiny nano means small!!
3 0
3 years ago
Read 2 more answers
Other questions:
  • 2. When manipulating your pedals, you should use your
    7·2 answers
  • Nicholas wants to verify whether a file is a hard link to a file within the same directory. Which of the following commands coul
    6·1 answer
  • 1. What is an op-amp? List the characteristics of an ideal op-amp
    11·1 answer
  • 1. Under what conditions can soils be chemically stabilized?
    8·1 answer
  • Help me! Phone Phoebe on 07375410044.
    7·2 answers
  • A cylindrical specimen of a titanium alloy having an elastic modulus of 107 GPa (15.5 × 106 psi) and an original diameter of 3.7
    14·1 answer
  • Rubber bushings are used on suspensions to
    9·1 answer
  • Two metallic terminals protrude from a device. The terminal on the left is the positive reference for a voltage called vx (the o
    9·2 answers
  • Once you get the answer correct first i will mark you brainliest!!
    15·2 answers
  • Problema sobre programacion orientada a objetos!!
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!