function mat=laplace(d) 
//matrice du laplacien 
L1=-eye(d,d); 
L2=toeplitz([4 -1 zeros(1,d-2)]);	//tridiagonale par blocs 
mat=zeros(d*d,d*d); 
for i=1:(d-1) 
  i1=(i-1)*d; 
  i2=i*d; 
  mat((i1+1):(i1+d),(i1+1):(i1+d)) = L2;// matrice 
  mat((i2+1):(i2+d),(i1+1):(i1+d)) = L1; 
  mat((i1+1):(i1+d),(i2+1):(i2+d)) = L1; 
end; 
i1=(d-1)*d; 
mat((i1+1):(i1+d),(i1+1):(i1+d)) =L2; 
//
