Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e224387

Browse files
committed
Added some comments
modified: cachematrix.R
1 parent cb68713 commit e224387

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

cachematrix.R

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
## Put comments here that give an overall description of what your
2-
## functions do
1+
## These functions cache previous calculated inverse of a matrix to avoid
2+
## possible time-consuming computations.
33

44
## Creates a matrix and returns a list containing functions
5-
## to update the matrix' for inversr caching
5+
## to manage and update the matrix' for inversr caching
66

77
makeCacheMatrix <- function(x = matrix()) {
88
myInv <- NULL
@@ -17,10 +17,10 @@ makeCacheMatrix <- function(x = matrix()) {
1717
}
1818

1919

20-
## Checks if I have a cached value of the matrix. If I do,
21-
## return the cached value. If not, calculate the inverse
22-
## of the incoming matrix via the solve function and cache
23-
## the inverse value for the next call.
20+
## Checks if the matrix list has a cached value of the matrix. If it
21+
## does, return the cached value. If not, calculate the inverse
22+
## of the matrix via the solve function and cache (or store) the
23+
## inverse value for the next call.
2424

2525
cacheSolve <- function(x) {
2626
invX <- x$getinv()

0 commit comments

Comments
 (0)