Code for Nonlinear Dynamics and Chaos Case Study 4