Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
0 of .
Results for:
P. 1
LUfac.bas: LU factorisation method in visual basic

LUfac.bas: LU factorisation method in visual basic

Ratings: (0)|Views: 31|Likes:
LUfac.bas: LU factorisation method (with pivotting) in visual basic. The method is demonstrated on an Excel spreadsheet.
LUfac.bas: LU factorisation method (with pivotting) in visual basic. The method is demonstrated on an Excel spreadsheet.

Categories:Types, School Work

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
See more
See less

04/18/2015

pdf

text

original

Numerical Methods Library in Excel VBA
Module
LUfac.bas
Title
Carries out an LU factorisation of a real matrix.
Description The spreadsheet contains the VBA source files for carrying out a LU factorisation of a real square
matrix

, so that
where
is a lower-triangular matrix (with diagonal elements set to 1) and
is an upper-triangular matrix and
is a permutation matrix. Interface Sub LUfac(a, n, perm, lfail) real a: on input the nxn matrix A, on output L and U integer n: the dimension of the matrix/vector integer perm: an n-vector, the column index of the permutation matrix P logical lfail: returns 'true' if the method fails, otherwise 'false'
Note the output matrix ‘a’ is such that th
e diagonal and upper-triangular
elements is the ‘U’ matrix and the lower
-triangular elements together
with 1s on the diagonal is the matrix ‘U’.

On exit ‘perm’ records the row exchanges that have occurred as a result
of pivoting, otherwise known as a permutation matrix P. It would be wasteful of computer memory to store the permutation matrix as an nxn array. P is taken to be made up of all zeros, except for P[j,i]=1 when perm(i)=j. Web source of code. http://www.numerical-methods.com/Excel_VBA/LU.xlsm
(key ‘Developer’ then ‘Visual Basic’ and then ‘LUfac_module’)
Web source of this guide www.numerical-methods.com/Excel_VBA/LUfac_bas.htm Web source of the algorithm http://www.numerical-methods.com/lineq/LU Factorisation.htm Dependent routines NONE

Activity (1)

You've already reviewed this. Edit your review.