This paper considers the data fitting of n given points in ℝm by a hinge function, as it appears in Breiman, and Pucar and Sjöberg. This problem can be seen as a mathematical programming problem with a convex objective function and equilibrium constraints. For the euclidean error, an enumerative approach is proposed, which is a polynomial method in the sample size n, for a fixed dimension m. An alternative formulation for the l1 error is also introduced, which is processed by a Sequential Linear Complementarity Problem approach. Some numerical results with both algorithms are included to highlight the efficiency of those procedures.