Example 9 Appendix_3_Code.pdf