function y = D1eq3_7(x);
% 
% This function evaluates the derivative operator
% for the finite differences method, Eq. (3.7),
% p. 41 in 
% D.A. Anderson, J.C. Tannehill, R.H. Pletcher,
% "Computational Fluid Mechanics and Heat Transfer", Hemisphere, New York, 1984.
%
np = length(x); % number of points 
dx = x(2)-x(1);
y = zeros(np, np); % initialization
for i=2:np-1 % first and last rows extra
   y(i,i-1) = -1/2/dx;
   y(i,i+1) = 1/2/dx;
end
y(1,1) = -3/2/dx;
y(1,2) = 2/dx;
y(1,3) = -1/2/dx;
y(np,np-2) = 1/2/dx;
y(np,np-1) = -2/dx;
y(np,np) = 3/2/dx;

