function [i,x]=gradconst(alpha,N)
I=speye(N,N);
diag = 2*I;
subd=-sparse(2:N,1:N-1,1,N,N);
A=diag+subd+subd';
b=ones(N,1);
x=zeros(N,1);
for i=1:100000
  p=b-A*x; 
  x=x+alpha*p;
  if (norm(p)<1.e-6)
    break
  endif
end
