answer.
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
sladkih [1.3K]
2 years ago
7

Problem 8. Define a function gs1_error(n) that accepts as input a non-negative integer n and outputs the error of the Gauss-Seid

el approximation (xn, yn) to the solution of system (1). In other words, it should output the distance between the nth approximation (xn, yn) and the true value (x_val,y_val) of the solution to (1).
Engineering
1 answer:
Fofino [41]2 years ago
7 0

Answer:

The MATLAB code will be:

close all;

clc;

clear all;

 

a = [20, 1, -2; 3, 20, -1; 2,-3, 20];

b = [17; -18; 25];

 

tol = 1e-6;

 

[M,N] = size(a);

if M~=N

   error('A is not a square Matrix');

end

 

x = [0,0,0];

xx(1,:) = x;

n = 100;

error = 0.00001;

 

for k = 2:n

   for i = 1:N

       s = 0;

       for j = 1:N

           if j ~= i

               s = s + a(i,j) * x(j);

           end

       end

       x(i) = (1/a(i,i)*(b(i) - s));

   end

   xx(k,:) = x;kk = k;

   Error = abs(max(xx(kk,:)- xx(k-1,:)))

   if Error<error

       break;

   end

end

 

fprintf ('The roots of equation are: ')

x

 

fprintf ('The number of iterations are: ')

k

 

fprintf ('The error is: ')

Error

Explanation:

You might be interested in
A 50-kg iron block and 20-kg copper block, both initially at 80 oC, are dropped into a large lake at 15 oC. Thermal equilibrium
bija089 [108]
I need this answer to please
5 0
2 years ago
Consider a 1.80-m-tall man standing vertically in water and completely submerged in a pool. Determine the difference between the
defon

Answer:

17.658 kPa

Explanation:

The hydrostatic pressure of a fluid is the weight of a column of that fluid divided by the base of that column.

P = \frac{weight}{base}

Also, the weight of a column is its volume multiplied by it's density and the acceleration of gravity:

weight = \delta * v * g

Meanwhile, the volume of a column is the area of the base multiplied by the height:

V = base * h

Replacing:

P = \frac{\delta * base * h * g}{base}

The base cancels out, so:

P = \delta * h * g

The pressure depends only on the height of the fluid column, the density of the fluid and the gravity.

If you have two point at different heights (or depths in the case of objects submerged in water) each point will have its own column of fluid exerting pressure on it. Since the density of the fluid and the acceleration of gravity are the same for both points (in the case of hydrostatics density is about constant for all points, it is not the case in the atmosphere), we can write:

\Delta P = \rho * g * (h1 - h2)

We do not know at what depth the man of this problem is, but it doesn't matter, because we know the difference in height of the two points of interes (h1 - h2) = 1.8 m. So:

\Delta P = 9.81 \frac{m}{s^{2} } * 1000 \frac{kg}{m^3} * 1.8 m = 17658 Pa = 17.658 kPa

4 0
2 years ago
A 10-mm drill rod was heat-treated and ground. The measured hardness He was found to be 300 Brinell. Estimate the endurance stre
lesya [120]

Answer:

The endurance strength for the rod is 434.6 MPa

Explanation:

Since the rod is used in rotating bending, we need to use Marin equation given by

S=k_ak_bS'_e

Here S stands for the endurance strength for rotating  bending, S'_e is the endurance strength, and k_a \text{ and } k_b are the parameters for Marin surface modification factor.

Endurance strength.

We can start finding the endurance strength, from the directions we know that the hardness H_e was found to be 300 Brinell, thus for such value we can find the ultimate tensile strength using

S_{ut}=3.41H_e

Replacing the hardness we get

S_{ut}=3.41(300) MPa \\ S_{ut}=1023 MPa

Now since the ultimate tensile strength has a value less than 1400 MPa, we can find the endurance strength using

S'_e =0.5S_{ut}

Replacing the tensile strength we get

S'_e=0.5(1023) MPa \\ S'_e = 511.5 MPa

Parameters for Marin surface modification factor.

From the directions we know that the drill rod has a ground surface finish, so then from tables we get

a=1.58 \text{ and } b = -0.085

Thus the surface factor will be

k_a=a(S_{ut})^b

Replacing values and the ultimate tensile strength

k_a=(1.58)1023^{-0.085}\\k_a=0.8766

Then we can find the rotating shaft factor, for a diameter of 10 mm, we can use the equation

k_b=1.24d^{-0.107}

Replacing the diameter we get

k_b=1.24(10)^{-0.107}\\k_b=0.9692

Estimating endurance strength for rotating shaft.

We can replace now all values we have found in Marin equation.

S=k_ak_bS'_e

S=(0.8766)(0.9692)(511.5) MPa

S=434.6 MPa

Thus the endurance strength for the rod is 434.6 MPa

3 0
2 years ago
One of the best ways to avoid weather-induced hazards is to _____.
enyata [817]

Answer:

c. avoid them by choosing not to drive if you expect severe weather

6 0
2 years ago
From the list below, select four situations in which casting is the preferred fabrication technique. (1) For alloys having low d
Masteriza [31]

Answer:

(1) , (2) , (4) ,(6).

Explanation:

Use of casting process:

1.When the size of the mold is more or we can say that when the size of casting is more.

2.When the mechanical strength of the casting product is not important.

3.When the required ductility of the product is not to high .Generally casting product is more brittle with high strength.

4.Generally cost of casting product is not too high or we can say that casting product is economically.

Therefore the following options are correct -

(1) , (2) , (4) ,(6).

5 0
2 years ago
Other questions:
  • A_____ transducer is a device that can convert an electronic controller output signal into a standard pneumatic output. A. pneum
    13·1 answer
  • The legend that Benjamin Franklin flew a kite as a storm approached is only a legend—he was neither stupid nor suicidal. Suppose
    5·1 answer
  • Air at 40°C flows over a long, 25-mm-diameter cylinder with an embedded electrical heater. In a series of tests, measurements we
    11·1 answer
  • Let Deterministic Quicksort be the non-randomized Quicksort which takes the first element as a pivot, using the partition routin
    13·1 answer
  • Suggest how any sorting algorithm can be augmented in a way to make the best-case count of its key comparisons equal to just n−1
    6·1 answer
  • Add a calculated field named AccountTime that calculates the number of days each client's accounts have been open. Assume today'
    6·1 answer
  • Python Homework
    12·1 answer
  • Water enters a circular tube whose walls are maintained at constant temperature at specified flow rate and temperature. For full
    8·1 answer
  • the ____ method is the safest turning technique to use as it does not expose your hands to the airbags deployment area
    15·1 answer
  • 1. A _____ is applied to a wall or roof rafters to add strength and keep the building straight and plumb.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!