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]
3 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]3 years ago
4 0

Answer:

<u>note:</u>

find the attachment:

You might be interested in
Air flows at 45m/s through a right angle pipe bend with a constant diameter of 2cm. What is the overall force required to keep t
HACTEHA [7]

Answer:

b)1.08 N

Explanation:

Given that

velocity of air V= 45 m/s

Diameter of pipe = 2 cm

Force exerted by fluid  F

F=\rho AV^2

So force exerted in x-direction

F_x=\rho AV^2

F_x=1.2\times \dfrac{\pi}{4}\times 0.02^2\times 45^2

F=0.763 N

So force exerted in y-direction

F_y=\rho AV^2

F_y=1.2\times \dfrac{\pi}{4}\times 0.02^2\times 45^2

F=0.763 N

So the resultant force R

R=\sqrt{F_x^2+F_y^2}

R=\sqrt{0.763^2+0.763^2}

R=1.079

So the force required to hold the pipe is 1.08 N.

3 0
3 years ago
Which rules of the road apply to people riding bicycles, under Illinois law? *
bulgar [2K]

Answer:

C-People biking must follow all rules and laws applicable to a motorist, with some minor exceptions​

Explanation:

People biking should ride on the right side of the right lane when safe, except to pass or make a left turn. When there is only one lane for traffic traveling in each direction and passing is permitted, the center of the street is marked with a broken yellow stripe

~Hope this helps!

4 0
3 years ago
Select the level of education that is best demonstrated in each example.
Nastasia [14]

Answer:

masters

associate

bachelors

Explanation:

8 0
3 years ago
Read 2 more answers
Before taking off a plane travels at a speed of 1/4 km per second. The runaway is 5 km. How many seconds does it take the plane
Vikentia [17]

Answer:

1 5segundos

Explanation:

8 0
3 years ago
What type of engineer works to create a practical and safe energy source?
Fittoniya [83]
Why did you put this on here when you know the answer lol
4 0
3 years ago
Other questions:
  • Which conditions are required for nuclear fusion to begin
    8·1 answer
  • Given the following materials and their corresponding thermal conductivity values, list them in order from most conductive to le
    12·1 answer
  • The viscosity of the water was 2.3×10^−5lb⋅⋅s/ft^2 and the water density was 1.94 slugs/ft^3. Estimate the drag on an 88-ft diam
    13·1 answer
  • Which line from "On Becoming an Inventor" supports the idea that Dean's time at Worcester Polytechnic Institute was very useful
    13·2 answers
  • Carbon dioxide (CO2) expands isothermally at steady state with no irreversibilities through a turbine from 10 bar, 500 K to 2 ba
    15·1 answer
  • Pay attention to the following questions!
    14·1 answer
  • The project's criteria.
    11·1 answer
  • What are the horizontal structures beneath a slab that help transfer the load from the slab to the columns?
    14·2 answers
  • All of the following affect friction EXCEPT
    8·1 answer
  • Which of the following situations best describes student engaged in active learning
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!