function value = r8mat_is_antipersymmetric ( m, n, a )

%*****************************************************************************80
%
%% r8mat_is_antipersymmetric() checks for antipersymmetry.
%
%  Discussion:
%
%    A is antipersymmetric if A(I,J) = -A(N+1-J,N+1-I).
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    17 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:
%
%    real ERROR_FROBENIUS, is 0.0 if the matrix is exactly
%    antipersymmetric.
%
  if ( ~ r8mat_is_square ( m, n, a ) )
    value = Inf
    return
  end

  value = 0.0;
  for i = 1 : m
    for j = 1 : n
      value = value + ( a(i,j) + a(n+1-j,n+1-i) ) ^ 2;
    end
  end

  value = sqrt ( value );

  return
end
