function r83v_res_test ( )

%*****************************************************************************80
%
%% R83V_RES_TEST tests R83V_RES.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    01 February 2016
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'R83V_RES_TEST\n' );
  fprintf ( 1, '  R83V_RES computes b-A*x, where A is an R83V matrix.\n' );
  fprintf ( 1, '  We check three cases, M<N, M=N, M>N.\n' );

  for i = 1 : 3

    if ( i == 1 )
      m = 3;
      n = 5;
    elseif ( i == 2 )
      m = 5;
      n = 5;
    elseif ( i == 3 )
      m = 5;
      n = 3;
    end

    seed = 123456789;
    [ a, b, c, seed ] = r83v_random ( m, n, seed );
    x = r8vec_indicator1 ( n );
    ax = r83v_mv ( m, n, a, b, c, x );
    r = r83v_res ( m, n, a, b, c, x, ax );
    r8vec_print ( m, r, '  Residual A*x-b:' );

  end

  return
end
