function bidim_test ( )

%*****************************************************************************80
%
%% bidim_test() tests bidim().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    15 November 2013
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'bidim_test():\n' );
  fprintf ( 1, '  bidim() solves a bidimensional Vandermonde linear system \n' );
  fprintf ( 1, '  of the form A*x=b\n' );

  n = 3;
  nn = ( ( n + 1 ) * n ) / 2;

  alpha = [ 0.0; 1.0; 2.0 ];
  beta = [ 0.0; 1.0; 2.0 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Vandermonde vector alpha:\n' );
  disp ( alpha );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Vandermonde vector beta:\n' );
  disp ( beta );

  a = bivand1 ( n, alpha, beta );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Bidimensional Vandermonde matrix A:\n' );
  fprintf ( 1, a );

  x = [ 5.0; 3.0; 6.0; 4.0; 1.0; 2.0 ];
  b = a * x;
  r8vec_print ( nn, b, '  Right hand side B:' );

  x = bidim ( n, alpha, beta, b );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Solution x:\n' );
  disp ( x );

  return
end
