function sawtooth_driver_test ( )

%*****************************************************************************80
%
%% sawtooth_driver_test() tests sawtooth_driver().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    05 March 2021
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'sawtooth_driver_test()\n' );
  fprintf ( 1, '  sawtooth_driver() evaluates the right hand side of the\n' );
  fprintf ( 1, '  sawtooth ODE.\n' );
  fprintf ( 1, '  Make a plot of it.\n' );

  [ omega, t0, y0, tstop ] = sawtooth_parameters ( );

  n = 129;
  t = linspace ( -2.0*pi, +2.0*pi, n );
  f = sawtooth_driver ( t );

  plot ( t, f, 'r-', 'linewidth', 3 );
  grid ( 'on' );
  xlabel ( '<--- T --->' );
  ylabel ( '<--- F(T,\omega) --->' );
  s = sprintf ( 'F(T,\\omega) for the sawtooth ODE, \\omega = %g', omega );
  title ( s );

  filename = sprintf ( 'sawtooth_driver_%g.png', omega );
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end

