function [ t, u, v ] = pendulum_euler_rk4 ( n )

%*****************************************************************************80
%
%% pendulum_euler_rk4 uses the RK4 method on the pendulum ODE.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    20 February 2020
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N: the number of steps to take.
%
%  Output:
%
%    real t(n+1), u(n+1), v(n+1): the times and solution values.
%
  g = 9.8;
  l = 1.0;

  f = @ pendulum_deriv;
  tspan = [ 0.0, 10.0 ];
  uv0 = [ pi/3.0; 0.0 ];

  [ t, uv ] = rk4 ( f, tspan, uv0, n );

  u = uv(:,1);
  v = uv(:,2);

  return
end

