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
Gas is kept in a 0.1 m diameter cylinder under the weight of a 100 kg piston that is held down by a spring with a stiffness k =
Artyom0805 [142]

Answer:

The spring is compressed by 0.275 meters.

Explanation:

For equilibrium of the gas and the piston the pressure exerted by the gas on the piston should be equal to the sum of  weight of the piston and the force the spring exerts on the piston

Mathematically we can write

Force_{pressure}=Force_{spring}+Weight_{piston}

we know that

Force_{pressure}=Pressure\times Area=300\times 10^{3}\times \frac{\pi \times 0.1^2}{4}=750\pi Newtons

Weight_{piston}=mass\times g=100\times 9.81=981Newtons

Now the force exerted by an spring compressed by a distance 'x' is given by Force_{spring}=k\cdot x=5\times 10^{3}\times x

Using the above quatities in the above relation we get

5\times 10^{3}\times x+981=750\pi \\\\\therefore x=\frac{750\pi -981}{5\times 10^{3}}=0.275meters

5 0
3 years ago
Three groups of students are given study outlines for 6 weeks. One group studies 2 hours a night, a second group studies 1 hour
katrin2010 [14]

Answer:

The constant here is the study outline

Explanation:

In scientific research, the constant variable is that part/variable of the experiment that does not change or is set not to change. Examples include temperature, environment or height.

Assuming the scenery described in this question is an experiment. All the groups presented are bound by a constant during the experiment. The constant here is the study outline. The study outline provided to the students is not going to change.

NOTE: There could be confusion as regards the answer being the final exam grade but that will be the dependent variable as that will be the outcome of the experiment while the time spent to study will be the independent variable.

8 0
3 years ago
Using Java..
uysha [10]

Answer:

The source code files for this question have been attached to this response.

Please download it and go through each of the class files.

The codes contain explanatory comments explaining important segments of the codes, kindly go through these comments.

Download java
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> java </span>
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> java </span>
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> java </span>
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> java </span>
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> java </span>
7 0
3 years ago
A piston-cylinder device contains 0.1 m3 of liquid water and 0.9 m² of water vapor in equilibrium at 800 kPa. Heat is transferre
docker41 [41]

Answer:

Initial temperature = 170. 414 °C

Total mass = 94.478 Kg

Final volumen = 33.1181 m^3

Diagram  = see picture.

Explanation:

We can consider this system as a close system, because there is not information about any output or input of water, so the mass in the system is constant.  

The information tells us that the system is in equilibrium with two phases: liquid and steam. When a system is a two phases region (equilibrium) the temperature and pressure keep constant until the change is completed (either condensation or evaporation). Since we know that we are in a two-phase region and we know the pressure of the system, we can check the thermodynamics tables to know the temperature, because there is a unique temperature in which with this pressure (800 kPa) the system can be in two-phases region (reach the equilibrium condition).  

For water in equilibrium at 800 kPa the temperature of saturation is 170.414 °C which is the initial temperature of the system.  

to calculate the total mass of the system, we need to estimate the mass of steam and liquid water and add them. To get these values we use the specific volume for both, liquid and steam for the initial condition. We can get them from the thermodynamics tables.

For the condition of 800 kPa and 170.414 °C using the thermodynamics tables we get:

Vg (Specific Volume of Saturated Steam) = 0.240328 m^3/kg

Vf (Specific Volume of Saturated Liquid) = 0.00111479 m^3/kg

if you divide the volume of liquid and steam provided in the statement by the specific volume of saturated liquid and steam, we can obtain the value of mass of vapor and liquid in the system.

Steam mass = *0.9 m^3 / 0.240328 m^3/kg = 3.74488 Kg

Liquid mass = 0.1 m^3 /0.00111479 m^3/kg = 89.70299 Kg  

Total mass of the system = 3.74488 Kg + 89.70299 Kg = 93,4478 Kg

If we keep the pressure constant increasing the temperature the system will experience a phase-change (see the diagram) going from two-phase region to superheated steam. When we check for properties for the condition of P= 800 kPa and T= 350°C we see that is in the region of superheated steam, so we don’t have liquid water in this condition.  

If we want to get the final volume of the water (steam) in the system, we need to get the specific volume for this condition from the thermodynamics tables.  

Specific Volume of Superheated Steam at 800 kPa and 350°C = 0.354411 m^3/kg

We already know that this a close system so the mass in it keeps constant during the process.

 

If we multiply the mass of the system by the specific volume in the final condition, we can get the final volume for the system.  

Final volume = 93.4478 Kg * 0.354411 m^3/kg = 33.1189 m^3

You can the P-v diagram for this system in the picture.  

For the initial condition you can calculate the quality of the steam (measure of the proportion of steam on the mixture) to see how far the point is from for the condition on all the mix is steam. Is a value between 0 and 1, where 0 is saturated liquid and 1 is saturated steam.  

Quality of steam = mass of steam / total mass of the system

Quality of steam = 3.74488 Kg /93.4478 Kg = 0,040 this value is usually present as a percentage so is 4%.  

Since this a low value we can say that we are very close the saturated liquid point in the diagram.  

6 0
3 years ago
Pam Jones worked for 41 years at the same company and had positive performance ratings and personnel records. She needed a calcu
UNO [17]

Answer:

a) The key issues are the sue for libel and the evidence.

b) I would make a deal with her and implement a security program in the company.

Explanation:

The main issue in this case is that Pam Jones sued the company for libel, and the company remains in a position in which it has to prove that the internal investigation followed the right steps and indeed, the proves reflected that she was guilty and the fact that she got fired was correct.

The important here is exactly that the theft can be proved.

As an HR Director, I would give the correct proves in order to win the case, and if that is impossible, because of the tools and evidence, I would make a deal with her where both parts can be adequate to the problem.

She can´t be working again in the company but she can get financed according to her working years; also I would use this case as a growing opportunity by implementing new security methods that give more confidence between the company and its employees.

5 0
3 years ago
Other questions:
  • Given the following data, plot the stress-strain curves for the two unknown materials on the same set of stress-strain axes. Den
    9·1 answer
  • What is the solution to the system of equations?<br><br>2x-y=7<br>y=2x+3​
    8·1 answer
  • A roller-coaster car is traveling at a speed of 23 m/s when it passes through point B. At that point, it enters a concave down c
    8·1 answer
  • . In order to prevent injury from inflating air bags, it is recommended that vehicle occupants sit at least __________ inches aw
    6·2 answers
  • A resonant six-turn loop of closely spaced turns is operating at 50 MHz. The radius of the loop is λ/30, and the loop is connect
    15·1 answer
  • A baseband signal with a bandwidth of 100 kHz and an amplitude range of±1 V is to be transmitted through a channel which is cons
    8·2 answers
  • A 16-lb solid square wooden panel is suspended from a pin support at A and is initially at rest. A 4-lb metal sphere is shot at
    8·1 answer
  • A spherical tank for storing gas under pressure is 25 m in diameter and is made of steel 15 mm thick. The yield point of the mat
    5·2 answers
  • Since no one is perfect is that a sentence fragment
    10·2 answers
  • Conditions of special concern: i. Suggest two reasons each why distillation columns are run a.) above or b.) below ambient press
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!