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
sladkih [1.3K]
3 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]3 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 1 m wide continuous footing is designed to support an axial column load of 250 kN per meter of wall length. The footing is pla
creativ13 [48]

Answer:

correct option is (A) 0.5

Explanation:

given data

axial column load = 250 kN per meter

footing placed =  0.5 m

cohesion = 25 kPa

internal friction angle =  5°

solution

we know angle of internal friction is 5° that is near to 0°

so it means the soil is almost cohesive soil.

and for  a pure cohesive soil

N_{\gamma } = 0

and we know formula for N_{\gamma } is

N_{\gamma } = (Nq - 1 ) × tan(Ф)   ..................1

so here Ф is very less  N_{\gamma } should be nearest to zero

and its value can be 0.5

so correct option is (A) 0.5

7 0
3 years ago
What do you think of web 3.0? do you think it will be realized someday in the future?​
Elodia [21]

Answer:

is this a question for hoework

7 0
3 years ago
What is the maximal coefficient of performance of a refrigerator which cools down 10 kg of water (and then ice) to -6C. Upper he
inysia [295]

Given:

Temperature of water, T_{1} = -6^{\circ}C =273 +(-6) =267 K

Temperature surrounding refrigerator, T_{2} = 21^{\circ}C =273 + 21 =294 K

Specific heat given for water, C_{w} = 4.19 KJ/kg/K

Specific heat given for ice, C_{ice} = 2.1 KJ/kg/K

Latent heat of fusion,  L_{fusion} = 335KJ/kg

Solution:

Coefficient of Performance (COP) for refrigerator is given by:

Max COP_{refrigerator} = \frac{T_{2}}{T_{2} - T_{1}}

= \frac{267}{294 - 267} = 9.89

Coefficient of Performance (COP) for heat pump is given by:

Max COP_{heat pump} = \frac{T_{1}}{T_{2} - T_{1}}\frac{294}{294 - 267} = 10.89

6 0
4 years ago
Water (density p-1000 is discharging from through a hole at the bottom of a graduated 71 cylinder. The mass flow rate exiting th
alexira [117]

Answer:

Please see attachment

Explanation:

Please see attachment

4 0
3 years ago
Radioactive wastes are temporarily stored in a spherical container, the center of which is buried a distance of 10 m below the e
a_sh-v [17]

Answer:

Outside temperature =88.03°C

Explanation:

Conductivity of air-soil from standard table

   K=0.60 W/m-k

To find temperature we need to balance energy

Heat generation=Heat dissipation

Now find the value

We know that for sphere

q=\dfrac{2\pi DK}{1-\dfrac{D}{4H}}(T_1-T_2)

Given that q=500 W

so

500=\dfrac{2\pi 2\times .6}{1-\dfrac{2}{4\times 10}}(T_1-25)

By solving that equation we get

T_2=88.03°C

So outside temperature =88.03°C

6 0
4 years ago
Other questions:
  • Sea X una variable aleatoria con funci´on de densidad
    9·1 answer
  • Vending machine controller (adapted from Katz, "Contemporary Logic Design") Design and implement a finite state machine that con
    10·1 answer
  • A 5000-lb truck is being used to lift a 1000-lb boulder B that is on a 200-lb pallet A. Knowing that the truck starts from rest
    8·1 answer
  • a triangle is defined by the three vertices. write the following functions of the triangle class assume that the point class has
    7·1 answer
  • Considering the two tables below called Orders and OrderLines, how many rows would be returned by this SQL query? SELECT o.Order
    10·1 answer
  • Consider the experiment of Problem 1.27, in which a frictionless puck is sliding straight across a rotating turntable through th
    10·1 answer
  • What engine does chrysler 300c have?​
    15·1 answer
  • 7. Sockets internal designs come in what sizes?
    5·1 answer
  • Overconfidence in more male drivers, particularly those under 25 years old, results in them being involved in crashes.
    14·1 answer
  • Discuss importance of good communication system​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!