谢谢回复!
数组不大,可能是我的代码有问题。下面是代码:
[Fortran] 纯文本查看 复制代码
program kakusann
Include 'link_fnl_shared.h'
USE NEQNJ_INT
USE UMACH_INT
implicit none
integer,parameter::n=2
integer::k,nout
real::x(n),xguess(n)
real::F(n),fnorm
real::lsjac(n,n)
F(1)=3*x(1)**3+2*x(1)
F(2)=4*x(2)**3+2*x(2)
lsjac(1,1)=9*x(1)**2+2
lsjac(1,2)=0.0
lsjac(2,1)=12*x(2)**2+2
lsjac(2,2)=0.0
xguess(1)=3.0
xguess(2)=3.0
call umach(2,nout)
call dNEQNJ (f,lsjac,x,xguess)
!WRITE (NOUT,99999) (X(K),K=1,N), FNORM
!99999 FORMAT (' The solution to the system is', /, ' X = (', 3F5.1, &
!')', /, ' with FNORM =', F5.4, //)
end program |