//Example 16.5 L=75*10^-2;//Length (m) T=1.7357;//Time period (s) //Assuming angle of deflection is less than 15 degrees g=4*%pi^2*L/T^2;//Acceleration due to gravity (m/s^2) printf('Acceleration due to gravity = %0.4f m/s^2',g) //Openstax - College Physics //Download for free at http://cnx.org/content/col11406/latest