      PROGRAM dyzdx
************************************************************************
* First derivate an x-ordered x-y-z file. From standard input it reads *
* input file (3 column, ordered with increasing value of x)            *
* The resulting x y z file flushed to standard output.                 *
************************************************************************
      parameter(nphys=100000)
      real xx(nphys),yy(nphys),zz(nphys),dx,x,y,z
      INTEGER I,mm

      mm=100000
      do 10 i=1,mm                                                  
       READ(*,*,END=11) xx(i),yy(i),zz(i)
10    continue   
11    mm=i-1

      do 20 i=1,mm-1
       x=(xx(i)+xx(i+1))/2
       dx=(xx(i+1)-xx(i))
       y=(yy(i+1)-yy(i))/dx
       z=(zz(i+1)-zz(i))/dx
       write(*,*) x,y,z
20    continue
      end

