function mad_timestep_plot ( t, label )

%*****************************************************************************80
%
%% mad_timestep_plot() plots the timesteps for mad_compute().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    10 July 2024
%
%  Author:
%
%    John Burkardt, Catalin Trenchea
%
%  Input:
%
%    real t(n+1): the sequence of time values.
%
%    string label: a label to prefix the plotfile name.
%    The file will be 'label_timestep.png'.
%
  tau = t(2:end) - t(1:end-1);

  figure ( );
  plot ( t(1:end-1), tau, '.-' );
  grid ( 'on' );
  title ( 'timestep plot' );
  xlabel ( '<-- t(i) -->' );
  ylabel ( '<-- tau(i) -->' );
  filename = sprintf ( '%s_timestep.png', label );
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end

