function i4mat_width_test ( )

%*****************************************************************************80
%
%% I4MAT_WIDTH_TEST tests I4MAT_WIDTH.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    08 March 2016
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'I4MAT_WIDTH_TEST\n' );
  fprintf ( 1, '  I4MAT_WIDTH determines the printing width of an I4MAT.\n' );

  m1 = 3;
  n1 = 3;
  a1 = [ ...
    11, 211, 3111; ...
    12, 222, 3222; ...
    13, 233, 3333 ];

  i4mat_print ( m1, n1, a1, '  A1:' );

  w = i4mat_width ( m1, n1, a1 );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  The printing width of A1 is %d\n', w );

  m2 = 3;
  n2 = 3;
  a2 = [ ...
    10,    23, 45; ...
    42, -1000, 63; ...
    77,    63, 90 ];

  i4mat_print ( m2, n2, a2, '  A2:' );

  w = i4mat_width ( m2, n2, a2 );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  The printing width of A2 is %d\n', w );

  return
end
