Python, Physics, Pendulum, Numerical Methods.
np.zeros(self.n_iter) self.theta_ = np.zeros(self.n_iter) self.omega_[0] = self.omega_0 self.theta_[0] = self.theta_0*np.pi/180.0 for i in range(self.n_iter-1): self.time_[i+1] = self.time_[i] + self.eta self.omega_[i+1] = self.omega_[i] + self.eta*alpha(self.theta_[i]) self.theta_[i+1] =