Initial commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
SUBROUTINE fdjac(n,x,fvec,np,df)
|
||||
INTEGER n,np,NMAX
|
||||
REAL df(np,np),fvec(n),x(n),EPS
|
||||
PARAMETER (NMAX=40,EPS=1.e-4)
|
||||
CU USES funcv
|
||||
INTEGER i,j
|
||||
REAL h,temp,f(NMAX)
|
||||
do 12 j=1,n
|
||||
temp=x(j)
|
||||
h=EPS*abs(temp)
|
||||
if(h.eq.0.)h=EPS
|
||||
x(j)=temp+h
|
||||
h=x(j)-temp
|
||||
call funcv(n,x,f)
|
||||
x(j)=temp
|
||||
do 11 i=1,n
|
||||
df(i,j)=(f(i)-fvec(i))/h
|
||||
11 continue
|
||||
12 continue
|
||||
return
|
||||
END
|
||||
Reference in New Issue
Block a user