本文实例讲述了C#实现矩阵乘法的方法。分享给大家供大家参考。具体如下:
static double[][] MatrixMultiplication(double[][] matrixOne, double[][] matrixTwo)
{
int aRows = matrixOne.Length; int aCols = matrixOne[0].Length;
int bRows = matrixTwo.Length; int bCols = matrixTwo[0].Length;
if (aCols != bRows)
throw new Exception("Out of