C#中通过二维数组创建矩阵
static double[][] CreateMatrix(int rows, int cols) { double[][] result = new double[rows][]; for (int i = 0; i < rows; ++i) result[i] = new double[cols]; // return result; } double[][] m = CreateMatrix(4,3);
C#中通过二维数组创建矩阵
static double[][] CreateMatrix(int rows, int cols) { double[][] result = new double[rows][]; for (int i = 0; i < rows; ++i) result[i] = new double[cols]; // return result; } double[][] m = CreateMatrix(4,3);