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
The nuclear reactions resulting from thermal neutron absorption in boron and cadmium are 10B5 + 1 n0 ï  7Li3 + 4He2 113Cd48 + 1
kirill115 [55]

Solution :

The nuclear reaction for boron is given as :

$^{10}\textrm{B}_5 + ^{1}\textrm{n}_0 \rightarrow ^{7}\textrm{Li}_3 + ^{4}\textrm{He}_2$

And the reaction for Cadmium is :

$^{113}\textrm{Cd}_48 + ^{1}\textrm{n}_0 \rightarrow ^{114}\textrm{Cd}_48 + \gamma [5 \ \textrm{MeV}]$

We know that it is easier that to shield or stop an alpha particle (i.e. He nucli) as they can be stopped or obstructed by only a few centimetres of the material. However, the gamma rays ( γ ) can penetrate through the material to a greater distance. Therefore, we can choose the first one.

6 0
3 years ago
How do I do this?<br> Blueprints, complete the missing view.
Ymorist [56]

Explanation:

Look at the drawings and decide which view is missing. Front? Side? Top? Then draw it

7 0
3 years ago
What are the 5 major forest types?
Nataly [62]

Answer:

1. Equatorial Evergreen or Rainforest

2. Tropical forest

3. Mediterranean forest

4. Temperate broad-leaved forest

5. Warm temperate forest

Explanation:

4 0
4 years ago
Read 2 more answers
A murder in a downtown office building has been widely publicized. You’re a police detective and receive a phone call from a dig
BaLLatris [955]

Answer:

Considering the plain view doctrine, which is an exception to the warrant requirement of the Fourth Amendment, is applied by law enforcement officers and courts who can seize evidence of a crime without a warrant, if the officer observes the evidence in plain view.

Explanation:

For any digital information related to a murder case that has been seized under the plain view doctrine to be used to convict you of a crime, has to comply with three conditions:

1.  The digital evidence must be in out in the open, and easily observable by the officer, this is what "plain view" refers to.

2. The officer must have a legal right to be where he got the information related to the case.

3. The 'incriminating' character of the information must be a clear hint of the murder to fall under the plain view doctrine and the officer´s experience will help him determining whether the information is evidence or not, upon probable cause related to a crime.

7 0
3 years ago
Read 2 more answers
We know that passengers can be either helpful or harmful to a driver. Describe a pro and a con of having passengers in your car.
anygoal [31]

Answer:

sub to pewdipie

6 0
3 years ago
Read 2 more answers
Other questions:
  • Identify the types of bonding that occur within a polymer system and how this affects its properties
    9·1 answer
  • A pump is used to deliver water from a lake to an elevated storage tank. The pipe network consists of 1,800 ft (equivalent lengt
    10·1 answer
  • This is a classification of back pain based on duration. A) AcuteB) RecurrentC) ChronicD) All of the above
    11·1 answer
  • An alternating current E(t) =120 sin(12t) has been running through a simple circuit for a long time. The circuit has an inductan
    6·1 answer
  • A hollow steel composite door with an 18-guage metal facing, hung on butt hinges with nonremovable pins, often with ventilation
    8·1 answer
  • 2. What formula relates work and power?​
    10·1 answer
  • In a mechanical assembly operation, the first work unit required 7.83 min to complete and the learning rate for mechanical assem
    9·1 answer
  • What is the probability that Tina will NOT wear a white t-shirt on the first day of her trip?
    12·1 answer
  • Diameter is a measure of .......
    10·1 answer
  • In __________, the air bags system checks itself for problems each time the ignition is turned on
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!