文件名称:gsxqf
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:2.29kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
vb编写的高斯消去法,通用函数,如有不好的地方,还请指教!-Dim a(), b(), n, k, l 定义必须的通用变量
Private Sub Command1_Click()
If k = n Then
Command1.Enabled = False
Text2.Enabled = False
Else
k = k+ 1
Text2 = ""
End If
End Sub
Private Sub Command2_Click()
If l = n Then
Text3.Enabled = False
Else
l = l+ 1
Text2 = ""
Text3 = ""
Command1.Enabled = True
Text2.Enabled = True
End If
End Sub
Private Sub Command3_Click() 求解方程组
Dim m()
ReDim m(1 To n, 1 To n)
For i = 1 To n- 1
For j = i+ 1 To n
m(j, i) = a(j, i)/a(i, i)
End Sub
Private Sub Form_Activate()
k = 1
l = 1
Picture1.Print "系数"
End Sub
Private Sub Text1_Change() 指定方程组元数
n = Val(Text1)
ReDim a(1 To n, 1 To n)
ReDim b(1 To n)
End Sub
Private Sub Text2_Change() 给方程组各系数Aij赋值
a(k, l) = Val(Text2)
Picture1.Print a(k, l) & ","
End Sub
Private Sub Text3_Change() 给方程组系数Bi赋值
b(l) = Val(Text3)
Picture1.Print b(l) & ","
End Sub
Private Sub Command1_Click()
If k = n Then
Command1.Enabled = False
Text2.Enabled = False
Else
k = k+ 1
Text2 = ""
End If
End Sub
Private Sub Command2_Click()
If l = n Then
Text3.Enabled = False
Else
l = l+ 1
Text2 = ""
Text3 = ""
Command1.Enabled = True
Text2.Enabled = True
End If
End Sub
Private Sub Command3_Click() 求解方程组
Dim m()
ReDim m(1 To n, 1 To n)
For i = 1 To n- 1
For j = i+ 1 To n
m(j, i) = a(j, i)/a(i, i)
End Sub
Private Sub Form_Activate()
k = 1
l = 1
Picture1.Print "系数"
End Sub
Private Sub Text1_Change() 指定方程组元数
n = Val(Text1)
ReDim a(1 To n, 1 To n)
ReDim b(1 To n)
End Sub
Private Sub Text2_Change() 给方程组各系数Aij赋值
a(k, l) = Val(Text2)
Picture1.Print a(k, l) & ","
End Sub
Private Sub Text3_Change() 给方程组系数Bi赋值
b(l) = Val(Text3)
Picture1.Print b(l) & ","
End Sub
(系统自动生成,下载前可以参看下载内容)
下载文件列表
高斯消去法/
高斯消去法/Form1.frm
高斯消去法/MSSCCPRJ.SCC
高斯消去法/工程1.vbp
高斯消去法/工程1.vbw
高斯消去法/Form1.frm
高斯消去法/MSSCCPRJ.SCC
高斯消去法/工程1.vbp
高斯消去法/工程1.vbw
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.