       subroutine lini1d(x,y,xi,yi,yxi)

c***********************************************************************
c      Linear Interpolation 1D
c      Written by Orlando Camargo Rodriguez
c      orodrig@ualg.pt
c      Universidade do Algarve
c      Physics Department
c      Signal Processing Laboratory
c      Faro, 20/08/2009 at 19:30
c****&******************************************************************

       real*8 x(2),y(2)
       real*8 xi,yi,yxi
       real*8 x1,x2,y1,y2

c***********************************************************************

       x1 = x(1)
       x2 = x(2)

       y1 = y(1)
       y2 = y(2)

       yxi = (y2-y1)/(x2-x1)

       yi  = y1 + (xi-x1)*yxi

c***********************************************************************
c      Back to main:
c***********************************************************************

       return

       end
