% ========================================================= % Test program for Gauss Elimination ... % ========================================================= % Setup matrix equation.... fprintf('Test matrix equation \n'); fprintf('=====================================\n'); A = [ 0 -1 3 4; 0 5 6 12; 1 6 0 2; 1 8 9 6 ] B = [ 6; 23; 9; 24 ] % Solve Ax= B with Gauss Elimination (no pivoting).... fprintf('Naive Implementation of Gauss Elimination\n'); fprintf('=========================================\n'); x = gaussnaive(A,B) % Solve Ax= B with Gauss Elimination and pivoting of rows.... fprintf('Gauss Elimination with Pivoting of Rows \n'); fprintf('=========================================\n'); x = gausspivot(A,B) fprintf('=========================================\n'); % ========================================================= % End!