simple pendulum using MATLAB