主题:fortran 90求助。debug有一个错误啊
use msflib
type(qwinfo) winfo
type(wxycoord) xy
integer(2) result
character*70 str(4)
real a
real(8) x,y
character C*4
str=(/"说明:病态矩阵修改前后解的柱状分布图","——各柱端为其分布值","红色——当b3=0.52时的分布值","黄色——当b3=0.53时的分布值"/)
!设置子窗口最大化
winfo.type=qwin$max
result=setwsizeqq(0,winfo)
result=setwsizeqq(qwin$framewindow,winfo)
!设置子窗口的背景设为黑色
result=setbkcolorrgb(#000000)
call clearscreen($gclearscreen)
!设置绘图的颜色为白色
result=setcolorrgb(#ffffff)
!设置窗口
result=setwindow(.true.,-1.0,10.,5.,-10.)
!绘制坐标轴
call moveto_w(-6.d0,0d0,xy)
result=lineto_w(6.d0,0d0) !横轴
y=14.
call moveto_w(0d0,14.d0,xy)
result=lineto_w(0d0,-14.d0) !纵轴
!坐标轴刻度
result=initializefonts()
result=setfont('h16w12i')
do i=1,5
x=i+0.0
call moveto_w(x,0d0,xy)
write(c,"(i1)") i
call outgtext(c)
enddo
result=initializefonts()
result=setfont('h16w12i')
do i=-8,8
y=i+0.0
call moveto_w(0d0,y,xy)
write(c,"(1x,i2)") i
call outgtext(c)
enddo
!绘制曲线
!设置绘图的颜色为红色(修改前)
result=setcolorrgb(#0000ff)
do b=0.9,1.,0.002
x=b
do a=0,1.199993,.001
y=a
result=setpixel_w(x,y)
enddo
enddo
do b=1.9,2.,0.002
x=b
do a=0,0.600023,.001
y=a
result=setpixel_w(x,y)
enddo
enddo
do b=2.9,3,0.002
x=b
do a=0,0.599982,.001
y=a
result=setpixel_w(x,y)
enddo
enddo
!设置绘图的颜色为黄色(修改后)
result=setcolorrgb(#00ffff)
do b=1.,1.1,0.002
x=b
do a=0,3.000004,.001
y=a
result=setpixel_w(x,y)
enddo
enddo
do b=2.,2.1,0.002
x=b
do a=0,-6.600013,-.001
y=a
result=setpixel_w(x,y)
enddo
enddo
do b=3.,3.1,0.002
x=b
do a=0,6.600008,.001
y=a
result=setpixel_w(x,y)
enddo
enddo
!设置字体颜色为白色
result=setcolorrgb(#ffffff)
do i=1,4
result=initializefonts() !初始化字体集
result=setfont('t''隶书''h24e')
x=0.5;y=10.-i
call moveto_w(x,y,xy)
call outgtext(str(i))
enddo
read(*,*) !按回车结束
end
use msflib
type(qwinfo) winfo
type(wxycoord) xy
integer(2) result
character*70 str(4)
real a
real(8) x,y
character C*4
str=(/"说明:病态矩阵修改前后解的分布图","——各曲线的端点或拐点为其分布值","红色线——当b3=0.52时的分布值","黄色线——当b3=0.53时的分布值"/)
!设置子窗口最大化
winfo.type=qwin$max
result=setwsizeqq(0,winfo)
result=setwsizeqq(qwin$framewindow,winfo)
!设置子窗口的背景设为黑色
result=setbkcolorrgb(#000000)
call clearscreen($gclearscreen)
!设置绘图的颜色为白色
result=setcolorrgb(#ffffff)
!设置窗口
result=setwindow(.true.,-1.0,10.,5.,-10.)
!绘制坐标轴
call moveto_w(-6.d0,0d0,xy)
result=lineto_w(6.d0,0d0) !横轴
y=14.
call moveto_w(0d0,14.d0,xy)
result=lineto_w(0d0,-14.d0) !纵轴
!坐标轴刻度
result=initializefonts()
result=setfont('h16w12i')
do i=1,5
x=i+0.0
call moveto_w(x,0d0,xy)
write(c,"(i1)") i
call outgtext(c)
enddo
result=initializefonts()
result=setfont('h16w12i')
do i=-8,8
y=i+0.0
call moveto_w(0d0,y,xy)
write(c,"(1x,i2)") i
call outgtext(c)
enddo
!绘制曲线
!设置绘图的颜色为红色(修改前)
result=setcolorrgb(#0000ff)
do a=1,2,0.00001
x=a+0.0
y=-0.599971*(x-1)+1.199994
result=setpixel_w(x,y)
enddo
do b=2,3,0.00001
x=b+0.0
y=-0.000041*(x-2)+0.600023
result=setpixel_w(x,y)
enddo
!设置绘图的颜色为黄色(修改后)
result=setcolorrgb(#00ffff)
do a=1,2,0.00001
x=a+0.0
y=-9.600017*(x-1)+3.000004
result=setpixel_w(x,y)
enddo
do b=2,3,0.00001
x=b+0.0
y=13.200021*(x-2)-6.600013
result=setpixel_w(x,y)
enddo
!设置字体颜色为白色
result=setcolorrgb(#ffffff)
do i=1,4
result=initializefonts() !初始化字体集
result=setfont('t''隶书''h24e')
x=0.5;y=10.-i
call moveto_w(x,y,xy)
call outgtext(str(i))
enddo
read(*,*) !按回车结束
end
type(qwinfo) winfo
type(wxycoord) xy
integer(2) result
character*70 str(4)
real a
real(8) x,y
character C*4
str=(/"说明:病态矩阵修改前后解的柱状分布图","——各柱端为其分布值","红色——当b3=0.52时的分布值","黄色——当b3=0.53时的分布值"/)
!设置子窗口最大化
winfo.type=qwin$max
result=setwsizeqq(0,winfo)
result=setwsizeqq(qwin$framewindow,winfo)
!设置子窗口的背景设为黑色
result=setbkcolorrgb(#000000)
call clearscreen($gclearscreen)
!设置绘图的颜色为白色
result=setcolorrgb(#ffffff)
!设置窗口
result=setwindow(.true.,-1.0,10.,5.,-10.)
!绘制坐标轴
call moveto_w(-6.d0,0d0,xy)
result=lineto_w(6.d0,0d0) !横轴
y=14.
call moveto_w(0d0,14.d0,xy)
result=lineto_w(0d0,-14.d0) !纵轴
!坐标轴刻度
result=initializefonts()
result=setfont('h16w12i')
do i=1,5
x=i+0.0
call moveto_w(x,0d0,xy)
write(c,"(i1)") i
call outgtext(c)
enddo
result=initializefonts()
result=setfont('h16w12i')
do i=-8,8
y=i+0.0
call moveto_w(0d0,y,xy)
write(c,"(1x,i2)") i
call outgtext(c)
enddo
!绘制曲线
!设置绘图的颜色为红色(修改前)
result=setcolorrgb(#0000ff)
do b=0.9,1.,0.002
x=b
do a=0,1.199993,.001
y=a
result=setpixel_w(x,y)
enddo
enddo
do b=1.9,2.,0.002
x=b
do a=0,0.600023,.001
y=a
result=setpixel_w(x,y)
enddo
enddo
do b=2.9,3,0.002
x=b
do a=0,0.599982,.001
y=a
result=setpixel_w(x,y)
enddo
enddo
!设置绘图的颜色为黄色(修改后)
result=setcolorrgb(#00ffff)
do b=1.,1.1,0.002
x=b
do a=0,3.000004,.001
y=a
result=setpixel_w(x,y)
enddo
enddo
do b=2.,2.1,0.002
x=b
do a=0,-6.600013,-.001
y=a
result=setpixel_w(x,y)
enddo
enddo
do b=3.,3.1,0.002
x=b
do a=0,6.600008,.001
y=a
result=setpixel_w(x,y)
enddo
enddo
!设置字体颜色为白色
result=setcolorrgb(#ffffff)
do i=1,4
result=initializefonts() !初始化字体集
result=setfont('t''隶书''h24e')
x=0.5;y=10.-i
call moveto_w(x,y,xy)
call outgtext(str(i))
enddo
read(*,*) !按回车结束
end
use msflib
type(qwinfo) winfo
type(wxycoord) xy
integer(2) result
character*70 str(4)
real a
real(8) x,y
character C*4
str=(/"说明:病态矩阵修改前后解的分布图","——各曲线的端点或拐点为其分布值","红色线——当b3=0.52时的分布值","黄色线——当b3=0.53时的分布值"/)
!设置子窗口最大化
winfo.type=qwin$max
result=setwsizeqq(0,winfo)
result=setwsizeqq(qwin$framewindow,winfo)
!设置子窗口的背景设为黑色
result=setbkcolorrgb(#000000)
call clearscreen($gclearscreen)
!设置绘图的颜色为白色
result=setcolorrgb(#ffffff)
!设置窗口
result=setwindow(.true.,-1.0,10.,5.,-10.)
!绘制坐标轴
call moveto_w(-6.d0,0d0,xy)
result=lineto_w(6.d0,0d0) !横轴
y=14.
call moveto_w(0d0,14.d0,xy)
result=lineto_w(0d0,-14.d0) !纵轴
!坐标轴刻度
result=initializefonts()
result=setfont('h16w12i')
do i=1,5
x=i+0.0
call moveto_w(x,0d0,xy)
write(c,"(i1)") i
call outgtext(c)
enddo
result=initializefonts()
result=setfont('h16w12i')
do i=-8,8
y=i+0.0
call moveto_w(0d0,y,xy)
write(c,"(1x,i2)") i
call outgtext(c)
enddo
!绘制曲线
!设置绘图的颜色为红色(修改前)
result=setcolorrgb(#0000ff)
do a=1,2,0.00001
x=a+0.0
y=-0.599971*(x-1)+1.199994
result=setpixel_w(x,y)
enddo
do b=2,3,0.00001
x=b+0.0
y=-0.000041*(x-2)+0.600023
result=setpixel_w(x,y)
enddo
!设置绘图的颜色为黄色(修改后)
result=setcolorrgb(#00ffff)
do a=1,2,0.00001
x=a+0.0
y=-9.600017*(x-1)+3.000004
result=setpixel_w(x,y)
enddo
do b=2,3,0.00001
x=b+0.0
y=13.200021*(x-2)-6.600013
result=setpixel_w(x,y)
enddo
!设置字体颜色为白色
result=setcolorrgb(#ffffff)
do i=1,4
result=initializefonts() !初始化字体集
result=setfont('t''隶书''h24e')
x=0.5;y=10.-i
call moveto_w(x,y,xy)
call outgtext(str(i))
enddo
read(*,*) !按回车结束
end