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 0852332 commit a512a5fCopy full SHA for a512a5f
cachematrix.R
@@ -10,6 +10,10 @@ makeCacheMatrix <- function(m = matrix()) {
10
m <<- newmatrix
11
cachedInverse <<- NULL
12
}
13
+ get <- function()
14
+ {
15
+ m
16
+ }
17
setinverse <- function(mi)
18
{
19
cachedInverse <<- mi
@@ -27,10 +31,10 @@ makeCacheMatrix <- function(m = matrix()) {
27
31
## the above makeCacheMatrix. The data in m is assumed to be invertable
28
32
29
33
cacheSolve <- function(m, ...) {
30
- ## Return a matrix that is the inverse of 'x'
- cachedInverse <- m$getInverse()
34
+ ## Return a matrix that is the inverse of 'm'
35
+ cachedInverse <- m$getinverse()
36
- if(!is.null(m))
37
+ if(!is.null(cachedInverse))
38
39
message("getting cached inverse")
40
return(cachedInverse)
0 commit comments