% This script file solves a system of equations by using % the Crout's LU decomposition method. %A= [9 -4 -2 0; -4 17 -6 -3; -2 -6 14 -6; 0 -3 -6 11]; %b = [24; -16; 0; 18]; % A=[1 -1 0;-1 2 -1; 0 -1 2]; % b=[1 0 0]; A=[1 1 1 1;2 3 1 5;-1 1 -5 3;3 1 7 -2]; b=[10 31 -2 18]; [L, U]=LUdecompCrout(A); y=ForwardSub(L,b); x=BackwardSub(U,y);