% Script P1: Checks ParJac
  randn('seed',0)
  for n = [10 20 40 80 200]
     fprintf('\n\nn = %1d\n\n',n)
     disp('      tol     Sweeps      errE         errD        errQ')
     disp('----------------------------------------------------------')
     A = randn(n,n); A = A + A';
     for tol = [.001 .000001 .000000001 .000000000001]
        [Q,D,sweeps] = ParJac(A,tol);
        errD = norm(Q'*A*Q - D,'fro')/norm(A,'fro');
        errQ = norm(Q'*Q - eye(n,n),'fro');
        errE  = norm(D - diag(diag(D)),'fro')/norm(A,'fro');
        fprintf('%10.1e    %4d    %10.1e   %10.1e   %10.1e  \n',tol,sweeps,errE,errD,errQ)
     end
  end
    