Update cachematrix.R

This is the Assignment-2 for the R programing course.