function x=deriv(x)
%  function x=deriv(x) 
%
%  This function takes the derivative of two columns of data.
%  In this case dy/dx = column 3 / column 2 = temp/press.
%  This is because the pressure is always going to increase
%  with depth, whereas temperature may not, thus preventing
%  dividing by zero. Also, the gradient criteria to be used for
%  de-spiking is 1 degree / meter.
%
%  This function takes the derivative and puts it in the fourth 
%  column of XBT data.
%
%  Daniel Torres, WHOI, 5/94

% For 3 column data
x(2:length(x),4)=diff(x(:,3))./diff(x(:,2));

