function A=Df(f,x)
d=sqrt(eps);n=length(x);A=zeros(n); 
for i=1:n , dx=[zeros(i-1,1);d/2;zeros(n-i,1)];
   A(:,i)=(feval(f,x+dx)-feval(f,x-dx))/d; end

