COD_analysis: slope, COD, writing, and analyze. All files required are also given.