rdpeng/ProgrammingAssignment2 — pull request #89 by vm7660 (2014-04-27 16:47:31+00:00)
Title: Create makeCacheMatrix.R

UnitTest:
> B = matrix(c(2, 4, 3, 1, 5, 7,0,8,9), nrow=3, ncol=3)
> solve(B)
[,1] [,2] [,3]
[1,] 0.3235294 0.2647059 -0.2352941
[2,] 0.3529412 -0.5294118 0.4705882
[3,] -0.3823529 0.3235294 -0.1764706
> class(B)
[1] "matrix"
> m1 <- makeCacheMatrix(B)
> cacheSolve(m1)
[,1] [,2] [,3]
[1,] 0.3235294 0.2647059 -0.2352941
[2,] 0.3529412 -0.5294118 0.4705882
[3,] -0.3823529 0.3235294 -0.1764706
> cacheSolve(m1)
getting cached data
[,1] [,2] [,3]
[1,] 0.3235294 0.2647059 -0.2352941
[2,] 0.3529412 -0.5294118 0.4705882
[3,] -0.3823529 0.3235294 -0.1764706