function ninety_histogram ( )

%*****************************************************************************80
%
%% ninety_histogram uses a histogram to find outliers in 90 data values.
%
%  Discussion:
%
%    Because the number of data points is fairly large, we hope that a 
%    histogram will show us whether any values are outliers.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    24 April 2018
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'ninety_histogram:\n' );
  fprintf ( 1, '  MATLAB version\n' );
  fprintf ( 1, '  Read a text file of 90 values, and create a histogram\n' );
  fprintf ( 1, '  that will expose outliers as isolated values.\n' );
%
%  Read TXT file, which has no headers, and only one column.
%
  data = load ( 'ninety_data.txt' );

  [ m, n ] = size ( data );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  %d x %d data records read from file.\n', m, n );
%
%  Diagnose outliers.
%
  check = isoutlier ( data );
%
%  List data indices associated with outliers.
%
  outlier_index = find ( check == 1 );
  outlier_num = length ( outlier_index );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of outliers detected = %d\n', outlier_num );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  #  Index  Value\n' );
  fprintf ( 1, '\n' );
  for i = 1 : outlier_num
    fprintf ( 1, '  %2d  %4d  %4d\n', i, outlier_index(i), data (outlier_index(i)) );
  end
%
%  Plot the data.
%
  histogram ( data )
  grid ( 'on' )
  xlabel ( '<-- Data Values -->', 'FontSize', 16 )
  ylabel ( '<-- Frequency -->', 'FontSize', 16 )
  title ( 'NINETY: Looking for Outliers', 'FontSize', 24 )
%
%  Save the graphics in a file.
%
  filename = 'ninety_histogram.png';
  print ( '-dpng', filename )
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'ninety_histogram:\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end
