function [ t0, z0, tstop ] = polar_parameters ( t0_user, z0_user, tstop_user )

%*****************************************************************************80
%
%% polar_parameters() returns parameters for polar_ode().
%
%  Discussion:
%
%    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:
%
%    24 April 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real T0_USER: the initial time.
%
%    complex Z0_USER: the initial condition.
%
%    real TSTOP_USER: the final time.
%
%  Output:
%
%    real T0: the initial time.
%
%    complex Z0: the initial condition.
%
%    real TSTOP: the final time.
%
  persistent t0_default;
  persistent z0_default;
  persistent tstop_default;
%
%  Initialize defaults.
%
  if ( isempty ( t0_default ) )
    t0_default = 0.0;
  end

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

  if ( isempty ( tstop_default ) )
    tstop_default = 6.0 * pi;
  end
%
%  Update defaults if input was supplied.
%
  if ( 1 <= nargin )
    t0_default = t0_user;
  end

  if ( 2 <= nargin )
    z0_default = z0_user;
  end

  if ( 3 <= nargin )
    tstop_default = tstop_user;
  end
%
%  Return values.
%
  t0 = t0_default;
  z0 = z0_default;
  tstop = tstop_default;
  
  return
end

