% Extra calculations with pendulum/lpendulum.

% Compute level 8, 9 and 10 evolutions and plot differences between
% two types of evolution.

tmax = 40
level = 8
theta0 = 0
omega0 =  0.01

[t8 theta8 omega8]   =  pendulum(tmax, 8, theta0, omega0);
[t9 theta9 omega9]   =  pendulum(tmax, 9, theta0, omega0);
[t10 theta10 omega10]   =  pendulum(tmax, 10, theta0, omega0);

[t8 ltheta8 lomega8]   =  lpendulum(tmax, 8, theta0, omega0);
[t9 ltheta9 lomega9]   =  lpendulum(tmax, 9, theta0, omega0);
[t10 ltheta10 lomega10]   =  lpendulum(tmax, 10, theta0, omega0);

plot(t8, theta8-ltheta8, t9, theta9-ltheta9, t10, theta10-ltheta10);
