
function gt=g(t,x,hx,d0,d1,G)

% Valuta: 
% g(t)=(1/hx^2)*(d0(t),0,...,0,d1(t))+[G(x1,t),...,G(x_(m-1),t)].

gt=feval(G,x,t);

gt(1)=gt(1)+(1/hx^2)*feval(d0,t);
gt(length(gt))=gt(length(gt))+(1/hx^2)*feval(d1,t);