subroutine splset(x,y,c,m) c*********************************************************************** c c this subroutine was taken from_ c introductory computer methods and numerical analysisby c ralph h. pennington c the mcmillan company -newyork 1965. c this subroutine will accept up to 487 points. c c***** x = independent variable c***** y = dependent variable c***** m = number of data points in the x and y arrays c***** c = coefficents of the cubic that is fit between adjacent data po c***** the following dimensions must be .ge. m c*********************************************************************** implicit integer*4(i-n),real*8 (a-h,o-z) real*8 d(487), p(487), e(487), a(487,3), b(487), z(487) real*8 x(1),y(1),c(4,1) mm=m-1 do 2 k=1,mm d(k)=x(k+1)-x(k) p(k)=d(k)/6. 2 e(k)=(y(k+1)-y(k))/d(k) do 3 k=2,mm 3 b(k)=e(k)-e(k-1) a(1,2)=-1.-d(1)/d(2) a(1,3)=d(1)/d(2) a(2,3)=p(2)-p(1)*a(1,3) a(2,2)=2.*(p(1)+p(2))-p(1)*a(1,2) a(2,3)=a(2,3)/a(2,2) b(2)=b(2)/a(2,2) do 4 k=3,mm a(k,2)=2.*(p(k-1)+p(k))-p(k-1)*a(k-1,3) b(k)=b(k)-p(k-1)*b(k-1) a(k,3)=p(k)/a(k,2) 4 b(k)=b(k)/a(k,2) q=d(m-2)/d(m-1) a(m,1)=1.+q+a(m-2,3) a(m,2)=-q-a(m,1)*a(m-1,3) b(m)=b(m-2)-a(m,1)*b(m-1) z(m)=b(m)/a(m,2) mn=m-2 do 6 i=1,mn k=m-i 6 z(k)=b(k)-a(k,3)*z(k+1) z(1)=-a(1,2)*z(2)-a(1,3)*z(3) do 7 k=1,mm q=1./(6.*d(k)) c(1,k)=z(k)*q c(2,k)=z(k+1)*q c(3,k)=y(k)/d(k)-z(k)*p(k) 7 c(4,k)=y(k+1)/d(k)-z(k+1)*p(k) return end