function [ c, xmin, xmax, t0, tstop ] = standing_wave_parameters ( c_user, ...
  xmin_user, xmax_user, t0_user, tstop_user )

%*****************************************************************************80
%
%% standing_wave_parameters() returns parameters for the standing wave equation.
%
%  Discussion:
%
%    d^2u/dt^2 = c^2 d^2u/dx^2
%    u[x,t] = sin(x) * cos(c*t)
%
%    If input values are specified, this resets the default parameters.
%    Otherwise, the output will be the current defaults.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    04 April 2025
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real c_user: the wave speed.
%
%    real xmin_user, xmax_user: the left and right interval endpoints.
%
%    real t0_user: the initial time.
%
%    real tstop_user: the final time.
%
%  Output:
%
%    real c: the wave speed. 
%
%    real xmin, xmax: the left and right interval endpoints.
%
%    real t0: the initial time.
%
%    real tstop: the final time.
%
  persistent c_default;
  persistent t0_default;
  persistent tstop_default;
  persistent xmax_default;
  persistent xmin_default;
%
%  Initialize defaults.
%
  if ( isempty ( c_default ) )
    c_default = 0.2;
  end

  if ( isempty ( xmin_default ) )
    xmin_default = -1.0;
  end

  if ( isempty ( xmax_default ) )
    xmax_default = 1.0;
  end

  if ( isempty ( t0_default ) )
    t0_default = 0.0;
  end

  if ( isempty ( tstop_default ) )
    tstop_default = 5.0;
  end
%
%  Update defaults if input was supplied.
%
  if ( 1 <= nargin )
    c_default = c_user;
  end

  if ( 2 <= nargin )
    xmin_default = xmin_user;
  end

  if ( 3 <= nargin )
    xmax_default = xmax_user;
  end

  if ( 4 <= nargin )
    t0_default = t0_user;
  end

  if ( 5 <= nargin )
    tstop_default = tstop_user;
  end
%
%  Return values.
%
  c = c_default;
  xmin = xmin_default;
  xmax = xmax_default;
  t0 = t0_default;
  tstop = tstop_default;

  return
end

