File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -10,25 +10,25 @@ 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 (inverse ) m <<- inverse
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
- # # Write a short comment describing this function
21
+ # # Cache the Solution
22
22
23
23
cacheSolve <- function (x , ... ) {
24
24
# # Return a matrix that is the inverse of 'x'
25
- m <- x $ getsolve ()
25
+ inverse <- x $ getinverse ()
26
26
if (! is.null(m )) {
27
27
message(" getting cached data" )
28
28
return (m )
29
29
}
30
30
data <- x $ get()
31
- m <- solve(data , ... )
32
- x $ setsolve(m )
31
+ inverse <- solve(data , ... )
32
+ x $ setsolve(inverse )
33
33
m
34
34
}
You can’t perform that action at this time.
0 commit comments