function A = laplacian1d_sparse(m)
% LAPLACIAN1D_SPARSE : discrete Laplacian matrix in 1 dimension
%
% A = laplacian1d_sparse(m) returns an m-by-m sparse matrix

e = ones(m, 1);
A = spdiags([-e 2*e -e], -1:1, m, m);