function M = NeumannMatrix1(N,L)

% with Neumann boundary conditions, using ghost points.
% now the matrix is size N+1 by N+1.  The first row
% is -2 2, the last row is 2 -2

h = L/N;
M = -2*eye(N+1);
for j=1:N
  M(j,j+1)=1;
end
for j=2:N+1
  M(j,j-1)=1;
end
M(1,2) = 2;
M(N+1,N) = 2;
M = M/h^2;
