# Systems of Linear Equations on MATLAB-Machine Learning-Lecture Handout, Exercises for Machine Learning. Pakistan Institute of Engineering and Applied Sciences, Islamabad (PIEAS)

## Machine Learning

Description: This lecture notes was distributed for Machine Learning course by Pakistan Institute of Engineering and Applied Sciences, Islamabad (PIEAS). Its main points are: Systems, Linear, Equations, MATLAB, Implementation, Residuals, Elementary, Elimination, Matrices, Gaussian
Showing pages  1  -  4  of  22
Lecture Outline (1/2)
Calculating Small Residuals
Forward-substitution for lower triangular system
Lx = b
Back-substitution for upper triangular system
Ux = b
Elementary Elimination Matrices
Gaussian Elimination
Finding Permutation Matrix
Lecture Outline (2/2)
Gaussian Elimination with Partial Pivoting
Gaussian Jordan Elimination with Partial
Pivoting
Crout’s Decomposition
Cholesky’s Decomposition
Tridiagonal Decomposition
Example 2.8 :Calculating Small
Residuals
A=[.913 .659;.457 .33]
A =
0.9130 0.6590
0.4570 0.3300
>> b=[.254 .127]'
b =
0.2540
0.1270
>> x=A\b
x =
1.0000
-1.0000
>> r=A*x-b
r =
1.0e-016 * 0
-0.5551
>>cond(A)
ans =
1.2485e+004
Refer EMSE, P-230
P-63
Forward-substitution for lower
triangular system Lx = b
>> L
L =
-1 0 0
-4 -6 0
1 2 2
>> b
b =1
-6
3
>> x=LTriSol(L,b)
x =
-1.0000
1.6667
0.3333
Refer SCMV, P-198
P-65