Gauss-Seidel Method with Relaxation
My Solutions >
Problem Description: Use the Gauss-Seidel method with relaxation to solve the following system to a specified tolerance (approximate absolute percent relative error). If necessary, rearrange the equations to achieve convergence.
10x12x2327
=
X1+2+5x3 = -21.5
3x16x2+2x=-61.5
The relaxation parameter() should be an input parameter of your function.
Function >
1 function x=GaussSeidel_Relax_Example(lambda, es)
2 % Gauss-Seidel for a 3-by-3 linear system of equations
3 %
4 %--Input
5% lambda: relaxation parameter
6 % es: error tolerance (approximate absolute percent relative error in solution)
7 %
8 %--Output
9 % X: Gauss-Seidel linear solution (3-by-1 vector)
10
11 % Note: 1. Use the Euclidian norm (i.e. 2-norm) to compute relative error.
12 %
13
2. You may need to rearrange the linear equations to achieve diagonal dominance.
14 % Write your code here.
15 A [10 2 -1; 1 1 5; -3 -6 2];
16 b = [27; 21.5; -61.5];
17 N = 3;
DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma
Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t
Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th
1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of
1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of