% Script nlutest.m % Testing LU factorization based on naive % gaussian elimination A = [ 1,2,1,4; 2,0,4,3; 4,2,2,1; -3,1,3,2 ] Acopy = A; A = nluFactor(A) b = [13; 28; 20; 6] x = nluSolve(A,b) % check Acopy*x - b