Skip to content

Commit a5320b7

Browse files
unknownunknown
authored andcommitted
fix comment
1 parent 1a3c727 commit a5320b7

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

cachematrix.R

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# Matrix inversion is usually a costly computation and their may be some benefit
22
# to caching the inverse of a matrix rather than compute it repeatedly
33

4-
# This function creates a special "matrix" object that can cache its inverse.
5-
64
makeCacheMatrix <- function(x = matrix()) {
5+
# This function creates a special "matrix" object that can cache its inverse.
76
i <- NULL
87
set <- function(y) {
98
x <<- y
@@ -15,14 +14,11 @@ makeCacheMatrix <- function(x = matrix()) {
1514
list(set = set, get = get, setinverse = setinverse, getinverse = getinverse)
1615
}
1716

18-
19-
# This function computes the inverse of the special "matrix" returned by
20-
# makeCacheMatrix above. If the inverse has already been calculated (and the
21-
# matrix has not changed), then the cachesolve should retrieve the inverse from
22-
# the cache.
23-
2417
cacheSolve <- function(x, ...) {
25-
## Return a matrix that is the inverse of 'x'
18+
# This function computes the inverse of the special "matrix" returned by
19+
# makeCacheMatrix above. If the inverse has already been calculated (and the
20+
# matrix has not changed), then the cachesolve should retrieve the inverse from
21+
# the cache.
2622
i <- x$getinverse()
2723
if (!is.null(i)) {
2824
message("gettting cached data")

0 commit comments

Comments
 (0)