0
基本上,Fortran對我的數組中的一些錯誤含糊不清。它說:Fortran數組語法錯誤
Newton_Interpolation_3D.f90:19.132:
0,-0.65364361d0,0.28366220d0,0.27015114d0,-0.20807342d0,-0.49499625d0, -
沒有別的。我檢查了我的數組,它看起來很好。有人可以告訴我xnodes數組有什麼問題嗎?
implicit none
double precision, allocatable, dimension(:,:) :: nt
double precision, allocatable, dimension(:) :: znodes, ynodes, xnodes, fval
double precision :: x, evalnewton
integer :: i,n,k
n = 24
allocate(xnodes(0:n), ynodes(0:n), znodes(0:n),fval(0:4) ,nt(0:n, 0:n))
xnodes = (/0.54030228d0 ,-0.41614684d0,-0.98999250d0,-0.65364361d0,0.28366220d0,
0.27015114d0, -0.20807342d0, -0.49499625d0, -0.32682180d0, 0.14183110d0,
0.18010077d0,-0.13871562d0,-0.32999751d0,-0.21788120d0,
9.45540667d0,0.13507557d0,-0.10403671d0,-0.24749812d0,
-0.16341090d0,7.09155500d0,0.10806046d0,-8.32293704d0,
-0.19799851d0,-0.13072872d0,5.67324422d0/)
!ynodes = (/0.84147102,0.90929741,0.14112000,-0.75680250,-0.95892429,0.42073551,0.45464870,7.05600008d-02,-0.37840125,-0.47946215,0.28049034,0.30309916, 4.70400006d-02,-0.25226751,-0.31964144,0.21036775,0.227324353,.52800004d-02,-0.18920062,-0.23973107 , -0.19178486 ,-0.15136050, 0.18185948, 2.82240007d-02 ,0.16829421/)
!znodes = (/ -0.41614693 , -0.65364355 , 0.96017027, -0.14550006, -0.83907157, -0.10403673, -0.16341089, 0.24004257 , -3.63750160d-02, -0.20976789, -4.62385453d-02, -7.26270750d-02, 0.10668559, -1.61666758d-02, -9.32301804d-02, -2.60091834d-02,-4.08527218d-02,6.00106418d-02,-9.09375399d-03,-5.24419732d-02, -1.66458786d-02,-2.61457413d-02,3.84068154d-02,-5.82000241d-03, -3.35628614d-02/)
fval = (/5.63,6.11,8.12,4.33,6.15/)
deallocate(xnodes,ynodes,znodes,nt,fval)
感謝幫助的人,我真的需要它。你有我的感激之情。我嘗試了你的回答,但是我的代表太低了。這個問題是我的第一個。 – Rob 2014-10-27 01:33:01