function box_behnken_test02 ( )

%*****************************************************************************80
%
%% box_behnken_test02() writes a Box-Behnken dataset to a file.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    19 October 2022
%
%  Author:
%
%    John Burkardt
%
  dim_num = 4;

  range = [ ...
    0.0, 0.0, 0.0, 0.0; ...
    1.0, 1.0, 1.0, 1.0 ]';

  fprintf ( 1, '\n' );
  fprintf ( 1, 'box_behnken_test02()\n' );
  fprintf ( 1, '  Write a Box-Behnken dataset to a file.\n' );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  The ranges:\n' );
  disp ( range );

  x_num = box_behnken_size ( dim_num );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  For dimension DIM_NUM = %d\n', dim_num );
  fprintf ( 1, '  the Box-Behnken design is of size %d\n', x_num );

  x = box_behnken ( dim_num, x_num, range );

  filename = 'box_behnken_04_33.txt';

  save ( filename, 'x', '-ascii' );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  The data was written to "%s".\n', filename );

  return
end
