function value = i4vec_is_equal ( n, a1, a2 )

%*****************************************************************************80
%
%% I4VEC_IS_EQUAL is true if two I4VEC's are equal.
%
%  Discussion:
%
%    Unbelievably, a row vector of 4 1's is NOT equal to a column
%    vector of 4 1's, because MATLAB insists on this prissy distinction.
%
%    So we have to rewrite both vectors as row vectors before doing
%    the check!
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    14 August 2017
%
%  Author:
%
%    John Burkardt
%
%  Parameters:
%
%    Input, integer N, the number of entries in the vectors.
%
%    Input, integer A1(N), A2(N), two vectors to compare.
%
%    Output, logical VALUE, is true if every pair of elements A1(I)
%    and A2(I) are equal.
%
  a1 = a1(:);
  a2 = a2(:);

  value = all ( a1(1:n) == a2(1:n) );

  return
end
