function [ut]=derv(n,t,u)
%
% Function derv computes the derivative vector 
% of the linear PDE problem
%
% Problem parameters
  xl=0.0;
  xu=1.0;
%
% BC at x = 0
  ut(1)=0.0;
%
% BC at x = 1
  ut(n)=0.0;
%
% Interior points
  dx=(xu-xl)/(n-1);
  dxs=dx*dx;
  for i=2:n-1
     ut(i)=(u(i+1)-2.0*u(i)+u(i-1))/dxs;
  end
