We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b334975 commit 455db45Copy full SHA for 455db45
cachematrix.R
@@ -24,17 +24,17 @@ makeCacheMatrix <- function(x = matrix()) {
24
}
25
26
27
-## Return the inverse matrix of the object returned by the above function.
+## Return the inverse matrix by calling the functions defined above
28
29
cacheSolve <- function(x, ...) {
30
## Return a matrix that is the inverse of 'x'
31
- invFunc <- x$getInverse()
32
- if(!is.null(invFunc)) {
+ invFunction <- x$getInverse()
+ if(!is.null(invFunction)) {
33
message("getting cached data")
34
- return(invFunc)
+ return(invFunction)
35
36
data <- x$get()
37
- invFunc <- solve(data, ...)
38
- x$setInverse(invFunc)
39
- invFunc
+ invFunction <- solve(data, ...)
+ x$setInverse(invFunction)
+ invFunction
40
0 commit comments