diff --git a/mex/sources/bytecode/SparseMatrix.cc b/mex/sources/bytecode/SparseMatrix.cc
index 8e0cb2b3d4424334bf1b94538e0d57d06216d137..4b2ea0417125d04f94bec204230ee11a99eb4582 100644
--- a/mex/sources/bytecode/SparseMatrix.cc
+++ b/mex/sources/bytecode/SparseMatrix.cc
@@ -1535,70 +1535,6 @@ dynSparseMatrix::simple_bksub(int it_, int Size, double slowc_l)
     }
 }
 
-void
-dynSparseMatrix::CheckIt(int y_size, int y_kmin, int y_kmax, int Size, int periods)
-{
-  constexpr double epsilon = 1e-7;
-  fstream SaveResult;
-  ostringstream out;
-  out << "Result" << iter;
-  SaveResult.open(out.str(), ios::in);
-  if (!SaveResult.is_open())
-    throw FatalExceptionHandling(" in CheckIt, Result file cannot be opened\n");
-  mexPrintf("Reading Result...");
-  int row, col;
-  SaveResult >> row;
-  mexPrintf("row=%d\n", row);
-  SaveResult >> col;
-  mexPrintf("col=%d\n", col);
-  mexPrintf("Allocated\n");
-  for (int j = 0; j < col; j++)
-    {
-      mexPrintf("j=%d ", j);
-      NonZeroElem *first;
-      int nb_equ = At_Col(j, &first);
-      mexPrintf("nb_equ=%d\n", nb_equ);
-      int line;
-      if (first)
-        line = first->r_index;
-      else
-        line = -9999999;
-      for (int i = 0; i < row; i++)
-        {
-          double G1a;
-          SaveResult >> G1a;
-          if (line == i)
-            {
-              if (abs(u[first->u_index]/G1a-1) > epsilon)
-                mexPrintf("Problem at r=%d c=%d u[first->u_index]=%5.14f G1a[i][j]=%5.14f %f\n", i, j, u[first->u_index], G1a, u[first->u_index]/G1a-1);
-              first = first->NZE_C_N;
-              if (first)
-                line = first->r_index;
-              else
-                line = -9999999;
-            }
-          else
-            {
-              if (G1a != 0.0)
-                mexPrintf("Problem at r=%d c=%d G1a[i][j]=%f\n", i, j, G1a);
-            }
-        }
-    }
-  SaveResult >> row;
-  mexPrintf("row(2)=%d\n", row);
-  double *B = static_cast<double *>(mxMalloc(row*sizeof(double)));
-  test_mxMalloc(B, __LINE__, __FILE__, __func__, row*sizeof(double));
-  for (int i = 0; i < row; i++)
-    SaveResult >> B[i];
-  SaveResult.close();
-  mexPrintf("done\n");
-  mexPrintf("Comparing...");
-  for (int i = 0; i < row; i++)
-    if (abs(u[b[i]]+B[i]) > epsilon)
-      mexPrintf("Problem at i=%d u[b[i]]=%f B[i]=%f\n", i, u[b[i]], B[i]);
-  mxFree(B);
-}
-
 void
 dynSparseMatrix::Check_the_Solution(int periods, int y_kmin, int y_kmax, int Size, double *u, int *pivot, int *b)
 {
diff --git a/mex/sources/bytecode/SparseMatrix.hh b/mex/sources/bytecode/SparseMatrix.hh
index 920049ecb9ccff3235fffc69a9fc4fb65d75826a..448750203a0be09e5e3aaca0de1500b7b11a153d 100644
--- a/mex/sources/bytecode/SparseMatrix.hh
+++ b/mex/sources/bytecode/SparseMatrix.hh
@@ -108,7 +108,6 @@ private:
   void Clear_u();
   void Print_u() const;
   void *Symbolic, *Numeric;
-  void CheckIt(int y_size, int y_kmin, int y_kmax, int Size, int periods);
   void Check_the_Solution(int periods, int y_kmin, int y_kmax, int Size, double *u, int *pivot, int *b);
   int complete(int beg_t, int Size, int periods, int *b);
   void bksub(int tbreak, int last_period, int Size, double slowc_l);