Dim i As Integer
Dim j As Integer
Dim k As Integer
Dim c As Integer
Dim d As Integer
Function ax(a() As Single, b() As Single, ByVal y As Integer)
For j = n To y + 1 Step -1
ax = a(y, j) * x(j) + ax
Next j
End Function
Private Sub xiaoyuan(a() As Single, b() As Single, n As Integer, fuzhi As Integer)
Dim max As Single
Dim maxl As Integer
Dim temp As Single
For k = 1 To n - 1
max = Abs(a(k, k))
maxl = k
For c = k + 1 To n
If Abs(a(c, k)) > max Then maxl = c: max = Abs(a(c, k))
Next c
For d = 1 To n
temp = a(k, d): a(k, d) = a(maxl, d): a(maxl, d) = temp
Next d
temp = b(k): b(k) = b(maxl): b(maxl) = temp
For j = k + 1 To n
For i = 1 + k To n
If a(k, k) = 0 Then MsgBox ("方程组系数矩阵奇异!!!"): fuzhi = 1: MsgBox ("矩阵系数奇异!!!"): Exit Sub
a(j, i) = a(j, i) - a(k, i) * (a(j, k) / a(k, k))
Next i
b(j) = b(j) - b(k) * (a(j, k) / a(k, k))
Next j
Next k
End Sub
Private Sub Command1_Click()
ReDim a(n, n)
ReDim b(n)
ReDim x(n)
ReDim label(n)
Dim fuzhi As Integer
fuzhi = 0
For i = 1 To n
I