VB.Net矩阵求逆

前端之家收集整理的这篇文章主要介绍了VB.Net矩阵求逆前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
Function Rect_yu(A As Array,L As Integer,C As Array) As Single '矩阵求逆
        Dim T0 As Single
        Dim T1 As Single
        Dim T2 As Single
        Dim T3 As Single
        Dim B(0,0) As Single
        Dim Num As Single
        Dim Chay As Integer
        Dim Chax As Integer
        Chay = 0
        Chax = 0
        ReDim B(L - 1,L - 1)
        Num = 0
        Dim add As Double
        add = 1 / Rect(A,L)
        For T0 = 0 To L
            For T3 = 0 To L
                For T1 = 0 To L - 1
                    If T1 < T0 Then
                        Chax = 0
                    Else
                        Chax = 1
                    End If
                    For T2 = 0 To L - 1
                        If T2 < T3 Then
                            Chay = 0
                        Else
                            Chay = 1
                        End If
                        B(T1,T2) = A(T1 + Chax,T2 + Chay)
                    Next T2
                Next T1
                Rect(B,L - 1) '调用求行列式值
                C(T3,T0) = Rect(B,L - 1) * add * ((-1) ^ (T0 + T3))
            Next T3
        Next T0
    End Function
原文链接:https://www.f2er.com/vb/257070.html

猜你在找的VB相关文章