function ival = r8mat_is_scalar_column ( m, n, a )

%*****************************************************************************80
%
%% r8mat_is_scalar_column() checks whether an R8MAT is a scalar along columns.
%
%  Discussion:
%
%    An R8MAT is a matrix of real values.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    09 April 2017
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer M, N, the row and column dimensions of 
%    the matrix.  M and N must be positive.
%
%    real A(M,N), the matrix.
%
%  Output:
%
%    integer IVAL:
%    -1, the matrix is not column scalar.
%    1, the matrix is column scalar.
%
  ival = 1;

  for j = 1 : n
    s = a(1,j);
    for i = 2 : m
      if ( a(i,j) ~= s )
        ival = -1;
      end
    end
  end

  return
end
