% minimizing internal energy

global mass;
global length;
global grav;
global tau;

mass = 0.01;
length = 2.0;
grav = 9.8;
tau = 0.1;

[thetamin, Imin] = fminbnd(@internal_energy_simple_pendulum, -pi, pi);
thetamin
Imin
