CN – Lab10 (Solution)

$ 20.99
Category:

Description

Direct methods for solving linear systems
Gauss s method with partial pivoting
Consider the linear system Ax = b; with A = (a(i;j))i;j=1 ;n and b = (b(1);:::; b(n))0:
Algorithm:
Input: n-order of the system; A-matrix of coe¢ cients; b-vector of free terms;
Output: x-vector of the solutions or a message in case of incompatibility of the system
1. For p = 1;:::;n 1
Let abs(a(q;p)) = max(abs(a(p : n;p))):
If a(q;p) = 0 then “Message”; Exit
If q =6 p interchange the lines p and q from A and b:
Perform the necessary operations for obtaining zeros on the column p; below a(p;p):
Apply the transformations also to the vector b:
2. If a(n;n) = 0 then “Message”; Exit
3. For i = n : 1 : 1 do
Compute x(i):
4. Display x:
Problems:
1. Implement the Gauss method for solving linear systems, using partial elimination. Solve the following system of equations:
:
(Facultative) 2. Find LU decomposition of the following matrix using Doolittle method.
:
For , solve the system Ax = b.
2

Reviews

There are no reviews yet.

Be the first to review “CN – Lab10 (Solution)”

Your email address will not be published. Required fields are marked *