Skip to content

Commit d0ff822

Browse files
committed
Added more comments
1 parent c7853f7 commit d0ff822

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

cachematrix.R

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33
# The matrix is assumed to be inversible. It returns a list of four helper functions to get & set a
44
# matrix, and to get and set its cached inverse
55
# The second function cacheSolve computes the inverse of a matrix and returns its value
6+
# Sample code to test
7+
# source("cacheMatrix.R")
8+
# c=rbind(c(1, -1/4), c(-1/4, 1))
9+
# a <- makeCacheMatrix(c)
10+
# a$get()
11+
# s <- cacheSolve(a)
12+
# s
13+
# a$set(s)
14+
# a$get()
15+
616

717

818
## This function creates a special "matrix" object that can cache its inverse. The function

0 commit comments

Comments
 (0)