Index: tol/btol/matrix_type/matgra.cpp
===================================================================
--- tol/btol/matrix_type/matgra.cpp	(revision 0ccafc7cd4244589109fdc4c59f11d386bff5eff)
+++ tol/btol/matrix_type/matgra.cpp	(revision 5ad65fac750bec686460bceaa7db593f3e57c784)
@@ -6801,4 +6801,40 @@
 
 
+  //--------------------------------------------------------------------
+  DeclareContensClass(BMat, BMatTemporary, BMatMaxColByRow);
+  DefExtOpr(1, BMatMaxColByRow, "MaxColByRow", 1, 1, "Matrix",
+  "(Matrix mat)",
+  I2("For each row returns two columns: first one has the index of the "
+     "column with the maximum value inside these row, and second one "
+     "the maximum value. Unknown values are skipped.",
+     "Devuelve dos columnas para cada fila: la primera con el índice "
+     "de la columna de máximo valor dentro de esa fila, y la segunda "
+     "con dicho valor máximo. Los valores omitidos no se tienen en "
+     "cuenta."),
+     BOperClassify::Statistic_);
+  void BMatMaxColByRow::CalcContens()
+//--------------------------------------------------------------------
+{
+  BMat& m = Mat(Arg(1));
+  int r = m.Rows();
+  int c = m.Columns();
+  int i, j;
+  contens_.Alloc(r,2);
+  for(i=0; i<r; i++)
+  {
+    BDat& mi  = contens_.Get(i,0); 
+    BDat& max = contens_.Get(i,1); 
+    max = BDat::NegInf();
+    for(j=0; j<c; j++)
+    {
+      if(max < m(i,j)) 
+      { 
+        mi = j+1;
+        max = m(i,j); 
+      }
+    }
+  }
+}
+
 //--------------------------------------------------------------------
 DeclareContensClass(BMat, BMatTemporary, BMatForMat);
