精选优质文档-倾情为你奉上第3章 (vb编程)39、列主元高斯消去法(1)通用程序:Public Function guass(n As Integer, a() As Single, b() As Single, x() As Single)Dim i As Integer, j As Integer, k As IntegerDim amax As Single, imax As Integer, s As SingleDim m As Single, t As Single, mm As SingleFor j = 1 To (n - 1)amax = Abs(a(j, j)imax = j比较对应于主元所在列中的各行数的绝对值大小For i = j + 1 To nIf (Abs(a(i, j) amax) Thenamax = Abs(a(i, j)imax = iEnd IfNext i 比较完毕将在主元所在列中绝对值比主元大的数对应的行与主元所在行互换If (ima