Update cachematrix.R

Modified Version