for n = [200,500,1000]
   A=round(10*rand(n));
%b=round(10*rand(8,1));
   b = (sum(A'))';
   z = ones(n,1);
% flops(0) % Obsolete command
   n

   %t1  = tic;
   tic
   x   = A\b;
   toc  % not extremely accurate, but one can get a sense on efficiency
format short
   err0 = max(abs(x-z))
   
% flops;
   tic
   y1  = inv(A)*b; toc
err1 = max(abs(y1-z))
   

   tic% flops(0);
   U   = rref([A b]);
   y2  = U(:,n+1);
   toc%flops
   err2 = max(abs(y2-z))
   
%  r    = b - A*x;   % best answer
%  s=b-A*y;% worse answer
end
