Skip to content

Commit d90d8c7

Browse files
authored
Update cachematrix.R
updated script. Naming correction (m to inv)
1 parent 48825a3 commit d90d8c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cachematrix.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ makeCacheMatrix <- function(x = matrix()) { # The function where data is stored
1010
inv <- NULL
1111
set <- function(y) {
1212
x <<- y
13-
m <<- NULL
13+
inv <<- NULL
1414
}
1515
get <- function() x
1616
setinv <- function(inverse) inv <<- inverse
@@ -23,7 +23,7 @@ makeCacheMatrix <- function(x = matrix()) { # The function where data is stored
2323
cacheSolve <- function(x, ...) { # A function that solves the inverse of a matrix 'x', the inverse is stored in makeCasheMatrix for fast retrival
2424
inv <- x$getinv()
2525
if(!is.null(inv)) {
26-
message("getting cached data")
26+
message("getting cached inverse")
2727
return(inv)
2828
}
2929
data <- x$get()

0 commit comments

Comments
 (0)