! jf(i,j) = expresie; i,j =1,n;

subroutine jfcn(n, w, jf)
real(4) w(n), jf(n,n)

jf =0.
x =w(1); y =w(2)
if( n>=3) z=w(3)

! Test1:
!f(1)=x*x +y*y -5.
!f(2)=y -exp(x) -1.

! jacobian:
!jf(1,1) =2*x; jf(1,2) =2*y
!jf(2,1) =-exp(x); jf(2,2) =1


! (2,1,-1)
!f(1) =x*x ++y*y +z*z-6.4
!f(2) =x*y*z +2.2
!f(3) =x +y-z*z-2.4

jf(1,1) =2*x;   jf(1,2) =2*y   
jf(1,3) =2*z 

jf(2,1) =y*z;   
jf(2,2) =x*z;   jf(2,3) =x*y;

jf(3,1) =1.;    jf(3,2) =1.;    jf(3,3) =-2*z


END
