-void print3x3(double *M)
-{
- printf("%f %f %f\n", M[0], M[3], M[6]);
- printf("%f %f %f\n", M[1], M[4], M[7]);
- printf("%f %f %f\n", M[2], M[5], M[8]);
-}
-
-void print3x1(double *M)
-{
- printf("%f\n", M[0]);
- printf("%f\n", M[1]);
- printf("%f\n", M[2]);
-}
-
-// solves Ax = B by Gauss-Jordan elimination, where A is a 3x3 matrix,
-// x is a column vector of length 3 and B is a row vector of length 3.
+// solves Ax = B by Gauss-Jordan elimination, where A is an NxN matrix,
+// x is a column vector of length N and B is a row vector of length N.