Update cachematrix.R

I don't understand very well my code but works with example https://class.coursera.org/rprog-002/forum/thread?thread_id=696 and in the description of the assigment it says "The problem just asks you to mimic the above functions to do a Matrix Inverse Caching"