% testGaussPP.m - main program for testing GaussPP(A,b) which solves a  
% linear systems of equations by Gaussian Elimination with Partial Pivoting
%
%% for n by n matrix
n=4;
for run=1:10
    A0=fix(random('unif',0,10,n,n));
    A=A0;
    b=fix(random('unif',0,10,n,1));
    [x, P]=GaussPP(A,b);
    error=norm(b-A0*x,2);
    AErr(run)=error;
end
AErr
%% for m by m matrix
m=5;
for run=1:10
    B0=fix(random('unif',0,10,m,m));
    B=B0;
    c=fix(random('unif',0,10,m,1));
    [x, P]=GaussPP(B,c);
    error=norm(c-B0*x,2);
    BErr(run)=error;
%   if error>eps [B0,c] end
end
BErr