Skip to content

Commit 2d46f18

Browse files
committed
Building Functions
able to produce a matrix in Cache and to Invert it
1 parent e1b87f9 commit 2d46f18

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cachematrix.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
## "matrix" object that can cache its inverse
77

88
makeCacheMatrix <- function(x = matrix()) {
9-
9+
CacheMatrix <<-x
10+
CacheMatrix
1011
}
1112

1213

@@ -18,4 +19,6 @@ makeCacheMatrix <- function(x = matrix()) {
1819

1920
cacheSolve <- function(x, ...) {
2021
## Return a matrix that is the inverse of 'x'
22+
Inverse.Matrix=solve(x)
23+
Inverse.Matrix
2124
}

0 commit comments

Comments
 (0)