标签:
矩阵的转置
数学定义:把矩阵A的行换成同序数的列得到的一个新矩阵,叫做A的转置矩阵.
Public Function Trans(Optional ByVal tMatrix As Matrix = Nothing) If tMatrix Is Nothing Then tMatrix = Me ‘参数为空,默认为自身转置 End If Dim tempMatrix As New Matrix(tMatrix.Col, tMatrix.Row) For i = 1 To tMatrix.Col For j = 1 To tMatrix.Row tempMatrix.Item(i, j) = tMatrix.Item(j, i) Next j Next i Return tempmatrix End Function
标签:
原文地址:http://www.cnblogs.com/experdot/p/4395006.html