You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: eliminateRedundantRows.m
    path of file: ./repos/linear-programming-using-MATLAB/codes/chapter4
    
    the code of the file until where you have to start completion: function [A, b, Eqin, infeasible] = ...
    eliminateRedundantRows(A, b, Eqin)
% Filename: eliminateRedundantRows.m
% Description: the function is an implementation of the 
% presolve technique that eliminates redundant rows
% Authors: Ploskas, N., & Samaras, N.
%
% Syntax: [A, b, Eqin, infeasible] = ...
%   eliminateRedundantRows(A, b, Eqin)
% 
% Input:
% -- A: matrix of coefficients of the constraints 
%    (size m x n)
% -- b: vector of the right-hand side of the constraints 
%    (size m x 1)
% -- Eqin: vector of the type of the constraints 
%    (size m x 1)
%
% Output:
% -- A: presolved matrix of coefficients of the 
%    constraints (size m x n)
% -- b: presolved vector of the right-hand side of the 
%    constraints (size m x 1)
% -- Eqin: presolved vector of the type of the 
%    constraints (size m x 1)
% -- infeasible: flag variable showing if the LP problem 
%    is infeasible or not
 
infeasible = 0;
row = find(Eqin == 0); % find the equality constraints
% get the rows of A that correspond to equality 
% constraints
Aeqin = A(row, :);
% get the elements of b that correspond to equality 
% constraints
beqin = b(row, :);
% find the number of the equality constraints
[m1, n] = size(Aeqin);
% create a 2 x m1 zero matrix
rowindex = zeros(2, m1);
% store the indices of the equality constraints in the 
% first row
rowindex(1, 1:m1) = row';
% compute the tolerance
tol = max(m1, n) * eps * norm(A, 'inf');
i = 1; 

    
function [A, b, Eqin, infeasible] = ...
    eliminateRedundantRows(A, b, Eqin)
% Filename: eliminateRedundantRows.m
% Description: the function is an implementation of the 
% presolve technique that eliminates redundant rows
% Authors: Ploskas, N., & Samaras, N.
%
% Syntax: [A, b, Eqin, infeasible] = ...
%   eliminateRedundantRows(A, b, Eqin)
% 
% Input:
% -- A: matrix of coefficients of the constraints 
%    (size m x n)
% -- b: vector of the right-hand side of the constraints 
%    (size m x 1)
% -- Eqin: vector of the type of the constraints 
%    (size m x 1)
%
% Output:
% -- A: presolved matrix of coefficients of the 
%    constraints (size m x n)
% -- b: presolved vector of the right-hand side of the 
%    constraints (size m x 1)
% -- Eqin: presolved vector of the type of the 
%    constraints (size m x 1)
% -- infeasible: flag variable showing if the LP problem 
%    is infeasible or not
 
infeasible = 0;
row = find(Eqin == 0); % find the equality constraints
% get the rows of A that correspond to equality 
% constraints
Aeqin = A(row, :);
% get the elements of b that correspond to equality 
% constraints
beqin = b(row, :);
% find the number of the equality constraints
[m1, n] = size(Aeqin);
% create a 2 x m1 zero matrix
rowindex = zeros(2, m1);
% store the indices of the equality constraints in the 
% first row
rowindex(1, 1:m1) = row';
% compute the tolerance
tol = max(m1, n) * eps * norm(A, 'inf');
i = 1; 
j = 1;
% perform row operations using Gauss - Jordan elimination 
% with partial pivoting
while (i <= m1) && (j <= n)
	% find the maximum element of jth column of Aeqin in 
	% absolute value
	[p, k] = max(abs(Aeqin(i:m1, j))); 
	% if the maximum element is less than tol, then set 
	% all the elements of jth column equal to zero
	if p < tol
        Aeqin(i:m1, j) = zeros(m1 - i + 1, 1);
        j = j + 1;
	% perform the pivoting operation and update matrix 
	% Aeqin and vector beqin
	else
        if p ~= 0
            k = k + i - 1;
            rowindex(:, [i k]) = rowindex(:, [k i]);
            beqin(i, :) = beqin(i, :) / Aeqin(i, j);
            Aeqin(i, j:n) = Aeqin(i, j:n) / Aeqin(i, j);
            i_nz = find(Aeqin(:, j));
            i_nz = setdiff(i_nz, i);
            for t = i_nz
                if beqin(i) ~= 0
                    beqin(t) = beqin(t) - ...
                        Aeqin(t, j) * beqin(i);
                    toler = abs(beqin) <= tol;
                    beqin(toler == 1) = 0;
                end