Skip to content

Commit a5a3429

Browse files
committed
Creating Function to calculate inverse of matrix.
1 parent 0189841 commit a5a3429

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

cachematrix.R

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@
88
## 3. set the inverse value of the matrix
99
## 4. get the inverse value of the matrix
1010
makeCacheMatrix <- function(x = matrix()) {
11+
m <- NULL
12+
set <- function(y) {
13+
x <<- y
14+
m <<- NULL
15+
}
16+
get <- function() x
17+
setinverse <- function(solve) m <<- solve
18+
getinverse <- function() m
19+
list(set = set, get = get,
20+
setinverse = setinverse,
21+
getinverse = getinverse)
1122

1223
}
1324

0 commit comments

Comments
 (0)