With this method any two points are simple joined together by a straight line segment. The desired interpolation point should therefore lie on this same line segment. The next codes calculate single point linear interpolation (xval,yval) using to vectors data (x,y).
You can this code to linear interpolation in FORTRAN
SUBROUTINE LinearInterpolation(x,y,xval,yval,n)
real::x(n),y(n),xval,yval
integer::n,i
yval = 0
do i=1,n
IF (xval >= x(i) .AND. xval < x(i+1)) then
yval = y(i)+(xval-x(i))*(y(i+1)-y(i))/(x(i+1)-x(i));
end if
end do
return
end SUBROUTINE