Chapter 6: Problem 26
Suppose we have measured the oscillation period \(T\) of a simple pendulum with a mass \(m\) at the end of a massless rod of length \(L\). We have varied \(L\) and recorded the corresponding \(T\) value. The measurements are found in a file src/files/pendulum. dat, containing two columns. The first column contains \(L\) values and the second column has the corresponding \(T\) values. Load the \(L\) and \(T\) values into two arrays. Plot \(L\) versus \(T\) using circles for the data points. We shall assume that \(L\) as a function of \(T\) is a polynomial. Use the NumPy utilities polyfit and poly1d, as explained in Exercise 6.4, and experiment with fitting polynomials of degree 1,2 , and 3. Visualize the polynomial curves together with the experimental data. Which polynomial fits the measured data best? Name of program file: fit_pendulum_data.py.
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.