function blend_rs_0dn_test ( )

%*****************************************************************************80
%
%% blend_rs_0dn_test() tests blend_rs_0dn().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    23 October 2008
%
%  Author:
%
%    John Burkardt
%
  m1 = 5;
  m2 = 4;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'blend_rs_0dn_test():\n' );
  fprintf ( 1, '  blend_rs_0dn() interpolates data in a table,\n' );
  fprintf ( 1, '  from corner data.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  The table is %d rows by %d columns.\n', m1, m2 );

  x = zeros ( m1, m2 );

  for i = 1 : m1
    r = (  i - 1 ) / ( m1 - 1 );
    for j = 1 : m2
      s = (  j - 1 ) / ( m2 - 1 );
      x(i,j) = blend_rs_0dn ( r, s, 1, @cubic_rs );
    end
  end

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Data blended by BLEND_RS_0DN:\n' );
  fprintf ( 1, '\n' );

  for i = 1 : m1
    fprintf ( 1, '  %10f  %10f  %10f  %10f\n', x(i,1:m2) );
  end
%
%  Load all data.
%
  for i = 1 : m1
    for j = 1 : m2
      r = (  i - 1 ) / ( m1 - 1 );
      s = (  j - 1 ) / ( m2 - 1 );
      x(i,j) = cubic_rs ( r, s, 1 );
    end
  end

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Exact data:\n' );
  fprintf ( 1, '\n' );

  for i = 1 : m1
    fprintf ( 1, '  %10f  %10f  %10f  %10f\n', x(i,1:m2) );
  end

  return
end
