function b = r8col_normalize_li ( m, n, a )

%*****************************************************************************80
%
%% r8col_normalize_li() normalizes an R8COL with the column infinity norm.
%
%  Discussion:
%
%    An R8COL is an M by N array of R8's, regarded as an array of N columns,
%    each of length M.
%
%    Each column is scaled so that the entry of maximum norm has the value 1.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    08 February 2012
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer M, N, the number of rows and columns.
%
%    real A(M,N), the array to be examined.
%
%  Output:
%
%    real B(M,N), the normalized array.
%
  b(1:m,1:n) = a(1:m,1:n);

  for j = 1 : n
    c = a(1,j);
    for i = 2 : m
      if ( abs ( c ) < abs ( a(i,j) ) ) 
        c = a(i,j);
      end
    end
    if ( c ~= 0.0 )
      b(1:m,j) = b(1:m,j) / c;
    end
  end

  return
end
