Update cachematrix.R

STRONGLY BASED on the example file [just applied to matrices]