fixed chachematrix.R

Made code for Assignment 2