%LUPP LU factorization created using MATLAB's mex utility
% to call LAPACK's DGETRF, Gaussian with partial pivoting.
% Created to illustrate the MATLAB mex facility. See:
% the gateway function in file lupp.F,
% the computational routine in file luppf.F,
% sample mex commands in file lupp_mex.m, and
% code to test lupp in file lupp_test.m.
% LUPP duplicates Matlab's built-in LU function (for real
% matrices that are dense).
%
% [L,U] = LUPP(A) stores an upper triangular matrix in U and a
% "psychologically lower triangular matrix" (i.e. a product of lower
% triangular and permutation matrices) in L, so that A = L*U. A can be
% rectangular.
%
% [L,U,P] = LUPP(A) returns unit lower triangular matrix L, upper
% triangular matrix U, and permutation matrix P so that P*A = L*U.
%
% [L,U,p] = LUPP(A,'vector') returns the permutation information as a
% vector instead of a matrix. That is, p is a row vector such that
% A(p,:) = L*U. Similarly, [L,U,P] = LUPP(A,'matrix') returns a
% permutation matrix P. This is the default behavior.
%
% Y = LUPP(A) returns the output from LAPACK'S DGETRF.
%
% Example:
% A = randn(300,200);
% [L,U]= lupp(A);
% norm(A - L*U,1) / norm(A,1)
% associated files:
% lupp.m -- describes the use of the lupp code
% lupp.F -- the gateway routine for lupp
% luppf.F -- a "computational routine" called by lupp.F
% lupp_mex.m -- has examples of mex commands to compile lupp.F
% lupp_test.m -- is a MATLAB routine that tests the compiled lupp
% readme.txt -- describes how to add to MATLAB's mex utilility
% to allow use of the Intel Fortran 11.0 compiler
% intelf11msvs2005opts.b and intelf11msvs2005opts.stp --
% two files discussed in readme.txt
% created or modified by L. Foster, 6-4-2009