Professional Documents
Culture Documents
CL314 Assignment 2
CL314 Assignment 2
Full Marks: 70
[For the MATLAB program Q1 and Q3 (highlighted in yellow) you give the name of the
program as “yourname_A2Q1” and “yourname_A2Q3” respectively and upload the
program in the following link given. In the starting of the program by “commenting”, you
should put your name and roll number as well]
https://drive.google.com/drive/folders/1x-
eXFDMZtU8FGbQvQoUyZs4HDo8Oe_Yl?usp=sharing
Q1. Solve the following set of equation by Gauss Elimination method: [5+10]
M+2N-O+3P=10
3M+6N-3O-2P=8
2M+N-2O+P=4
M+N+O-P=2
Also, write a MATLAB program for Gauss Elimination with partial pivoting (only by
switching rows) and validate the solution you got for the above set of equations.
Q2. Find out the lower triangular matrix (L) for LU decomposition of the following
matrix:
25 5 4
𝐴 = [10 8 16] [5]
8 12 22
Q3. Find out the solution of the following set of equations using Cholesky Decomposition
method:
3a+c=7
a-b+4c=4
5b-c=9
Also, write a MATLAB program to construct the L matrix and validate your result with
the L matrix you got. [10+10]
Q4. Find out the number of Addition or subtraction and the number of multiplication or
division are required for solving “n” linear equations with “n” unknowns by Gauss
Elimination method. [10]
Q5. Solve the following set of equations using tridiagonal matrix algorithm: [10]
𝑡1 − 𝑡2 = 1
𝑡1 − 2𝑡2 + 𝑡3 = 0
𝑡2 − 2𝑡3 + 𝑡4 = 0
𝑡3 − 2𝑡4 + 𝑡5 = 0
𝑡5 = 1
Q6. Write a program for making a matrix diagonal predominant such that the if there
are two candidate for the same row, priority should be given to the element has larger
value. See the following matrix:
A=[ 1 1 -1 2 6
3 6 -3 -2 8
1 2 -1 3 10
1 0 3 1 6]
A=[1 1 -1 2 6
3 6 -3 -2 8
1 0 3 1 6
1 2 -1 3 10]
Notice that there are two rows qualify for the place of 4th row, but among these two
rows, which has largest absolute value takes the place. [10]