function P = pei(n, alpha)
%PEI    Pei matrix.
%   GALLERY('PEI',N,ALPHA), where ALPHA is a scalar, is the symmetric 
%   matrix ALPHA*EYE(N) + ONES(N). The default for ALPHA is 1.
%   The matrix is singular for ALPHA = 0, -N.

%   Reference:
%   [1] M.L. Pei, A test matrix for inversion procedures, Comm. ACM, 
%   5 (1962), p. 508.
%
%   Copyright (c) 1984-98 by The MathWorks, Inc.
%   $Revision: 1.5 $  $Date: 1997/11/21 23:29:52 $

if nargin == 1, alpha = 1; end

P = alpha*eye(n) + ones(n);
