<p>*Problem Statement*
%
% *** Write a function called pendulum that is called like
this: T = pendulum(L,a0), where all arguments are
scalars and a0 is a positive number less than π. The
function calculates the period T of a simple pendulum,
which is the time required for a weight attached to a rod
of length L and negligible weight to start from rest, swing
with no friction under the influence of gravity from an initial angle a0, to – a0 and back to a0 again,
as shown in the figure. The motion is determined by physics using the following definitions, where
units [square brackets] are provided but are not needed:
θ = angle [radians]