www.numerical-methods.comLU factorisation and back substitution –Excel Spreadsheet1 This spreadsheet contains the VBA source files for carrying out the LU factorisation and back-substitution of a general square matrix, which is useful in solving general linear systems of equations 2 . Several test problems that demonstrate the computation of LU factors are given and these are followed up by examples of solving matrix-vector systems by backward and forward substitution. The spreadsheet implements two algorithms as VBA subroutines that can be viewed or downloaded; the LU factorisation method LUfac 3 and the LU back and forward substitution method LUfbsub 4 . The spreadsheet consists of three sheets; the first sheet demonstrates the methods on a 3x3 matrix a nd matrix-vector proble m, the second shee ts similarly on a 5x5 problem and the third sheet similarly on a similar 10x10 p roblem. Two al gorithms are implemented in VBA in order to carry out the objectives of this spreadsheet; LU factorisation and backward and forward substitution. All three spreadsheets find the LU factorisation of a matrix ‘ A’, giving L and U. The LU factorisation method also requires and also a permutation matrix is allowed, to record row exchanges (as a result of pivoting) throughout the method, necessary to avoid division by zero or ‘small’ numbers. In summary, the spreadsheet returns the lower-triangular matrix L, the upper-triangular matrix U and the permutation matrix P so that Since the three sheets have a similar format then it is suffice to consider the first sheet in this document. An image of the top half of page one of the spreadsheet is shown below. The 3x3 ma trix is placed in the 3x3 ye llow square and h. The sheet is able to solve any 3x3 system, by pacing the matrix in the yellow 3x3 grid and the vector in the yellow 1x3 column. However the following sample test problem is included and this can be restored by using the button. ( ) ( ) ( )1 LU.xlsm2 LU Factorisation3 LUfac4 LUfbsub
5
Embed
LU Factorisation and Forward and Back Substitution_Excel
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
8/12/2019 LU Factorisation and Forward and Back Substitution_Excel
LU factorisation and back substitution – Excel Spreadsheet 1
This spreadsheet contains the VBA source files for carrying out the LU factorisation and
back-substitution of a general square matrix, which is useful in solving general
linear systems of equations2. Several test problems that demonstrate the computation
of LU factors are given and these are followed up by examples of solving matrix-vector
systems by backward and forward substitution. The spreadsheet implements two
algorithms as VBA subroutines that can be viewed or downloaded; the LU factorisation
method LUfac3 and the LU back and forward substitution method LUfbsub4.
The spreadsheet consists of three sheets; the first sheet demonstrates the methods on a
3x3 matrix and matrix-vector problem, the second sheets similarly on a 5x5 problem
and the third sheet similarly on a similar 10x10 problem. Two algorithms are
implemented in VBA in order to carry out the objectives of this spreadsheet; LU
factorisation and backward and forward substitution. All three spreadsheets find the LU
factorisation of a matrix ‘ A’, giving L and U . The LU factorisation method also requiresand also a permutation matrix is allowed, to record row exchanges (as a result of
pivoting) throughout the method, necessary to avoid division by zero or ‘small’numbers. In summary, the spreadsheet returns the lower-triangular matrix L, the
upper-triangular matrix U and the permutation matrix P so that
Since the three sheets have a similar format then it is suffice to consider the first sheet
in this document.
An image of the top half of page one of the spreadsheet is shown below.
The 3x3 matrix is placed in the 3x3 yellow square and h. The sheet is able to solve any
3x3 system, by pacing the matrix in the yellow 3x3 grid and the vector in the yellow 1x3
column. However the following sample test problem is included and this can be