function A = poisson(n)
%POISSON Block tridiagonal matrix from Poisson's equation.
%   GALLERY('POISSON',N) is the block tridiagonal (sparse) matrix 
%   of order N^2 resulting from discretizing Poisson's equation with 
%   the 5-point operator on an N-by-N mesh.

%   Reference:
%   [1] G.H. Golub and C.F. Van Loan, Matrix Computations, 2nd edition,
%       Johns Hopkins University Press, Baltimore, Maryland, 1989,
%       section 4.5.4.
%
%   Copyright (c) 1984-98 by The MathWorks, Inc.
%   $Revision: 1.5 $  $Date: 1997/11/21 23:29:53 $

S = tridiag(n,-1,2,-1);
I = speye(n);
A = kron(I,S) + kron(S,I);
