      PROGRAM tpolint
C     driver for routine polint
      INTEGER NP
      REAL PI
      PARAMETER(NP=50,PI=3.1415926)
      INTEGER i,n,nfunc,fp,n1,m1
      REAL dy,f,x,y,xa(NP),ya(NP),XM(NP,NP)

      open (unit=8,file="Log10.dat")
      fp=8

      write(*,*) 'citam podatke'

      read(fp,*) n1,m1
      call readmatrix(XM,n1,m1,fp)
      close(fp)

c pretvori u vektore
      do i=1,n1
         xa(i)=XM(i,1)
         ya(i)=XM(i,2)
      End do

      open (unit=8,file="Interp.dat")
      fp=8
c      n1=9
      do i=1,n1
         x=(0.1+(i-1)*10.0/n1)
          call polint(xa,ya,n1,x,y,dy)
          write(fp,'(1x,2f12.6,e15.4)') x,y,dy
       End do
       write(*,*) '***********************************'
       write(*,*) 'Press RETURN'
       read(*,*)
       END
