Update cachematrix.R

submit assignment2 of Coursera R Course