File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -8,14 +8,15 @@ makeCacheMatrix <- function(x = matrix()) {
8
8
i <- NULL
9
9
set <- function (y ) {
10
10
x <<- y
11
- <<- NULL
11
+ i <<- NULL
12
12
}
13
13
get <- function () x
14
14
setinverse <- function (inverse ) i <<- inverse
15
15
getinverse <- function () i
16
16
list (set = set , get = get ,
17
17
setinverse = setinverse ,
18
- getinverse = getinverse )
18
+ getinverse = getinverse
19
+ )
19
20
20
21
}
21
22
@@ -26,10 +27,10 @@ makeCacheMatrix <- function(x = matrix()) {
26
27
cacheSolve <- function (x , ... ) {
27
28
# # Return a matrix that is the inverse of 'x'
28
29
29
- i <- x $ getInverse ()
30
+ i <- x $ getinverse ()
30
31
if (! is.null(i )) {
31
32
message(" getting cached data" )
32
- return (m )
33
+ return (i )
33
34
}
34
35
data <- x $ get()
35
36
i <- solve(data , ... )
You can’t perform that action at this time.
0 commit comments