- 积分
- 269
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-7-12
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
各位,下面这个程序,我把x(i,j)的值写到file2里面,如果file2是x.txt的时候,打开发现里面的数值没有问题,但如果它是x.dat画出来的图中变量的取值变得很大,跟大家请教一下是什么原因?
program lin
implicit none
character *50 file1,file2
integer i,j
real m(17,73),x(17,73)
filen1="d:\f\m.dat"
filen2="d:\f\x.dat"
!读取wx
open(11,file=file1,form="binary")
do i=1,17
read(11)(m(i,j),j=1,73)
end do
open(12,file=file2)
do i=1,17
do j=1,73
if (m(i,j)<=0)then
x(i,j)=m(i,j)+180
else
x(i,j)=m(i,j)
endif
write(12,*)x(i,j)
end do
end do
end
|
|