File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -10,24 +10,24 @@ makeCacheMatrix <- function(x = matrix()) {
10
10
m <<- NULL
11
11
}
12
12
get <- function () x
13
- setsolve <- function (solve ) m <<- solve
14
- getsolve <- function () m
13
+ setinverse <- function (solve ) m <<- solve
14
+ getinverse <- function () m
15
15
list (set = set , get = get ,
16
- setsolve = setsolve ,
17
- getsolve = getsolve )
16
+ setinverse = setinverse ,
17
+ getinverse = getinverse )
18
18
}
19
19
20
20
21
21
# This function computes the inverse of a matrix. If it's already been
22
22
# calculated, then the function will retrieve the cached inverse.
23
23
cacheSolve <- function (x , ... ) {
24
- m <- x $ getsolve ()
24
+ m <- x $ getinverse ()
25
25
if (! is.null(m )) {
26
26
message(" getting cached data" )
27
27
return (m )
28
28
}
29
29
data <- x $ get()
30
30
m <- solve(data , ... )
31
- x $ setsolve (m )
31
+ x $ setinverse (m )
32
32
m
33
33
}
You can’t perform that action at this time.
0 commit comments