一个M*N矩阵,求一段最优代码或思路实现矩阵的逆转。急!急!急!

解决方案 »

  1.   

    矩阵论上的算法就很好。如果你嫌麻烦,直接用MATLAB的库
      

  2.   

    就是让M*N的矩阵变成N*M的矩阵,望能提供C#算法,谢谢!
      

  3.   

    /// 矩阵的转置
             public bool MatrixInver(double[,] a, ref double[,] b)
             {
                 if (a.GetLength(0) != b.GetLength(1) || a.GetLength(1) != b.GetLength(0))
                     return false;
                 for (int i = 0; i < a.GetLength(1); i++)
                     for (int j = 0; j < a.GetLength(0); j++)
                         b[i, j] = a[j, i];             return true;
             }