Skip to content

Commit 7229f33

Browse files
committed
Update cachematrix.R
1 parent e46458d commit 7229f33

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

cachematrix.R

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#
1+
# Cache Gettter and Seeter
22
cachesolve <- function(x, ...) {
33
i<- x$getInverse()
44
if(!is.null(i)) {
@@ -11,6 +11,7 @@ cachesolve <- function(x, ...) {
1111
i
1212
}
1313

14+
# Create the inverse matrix using solve
1415
makeCacheMatrix <- function(x = matrix()) {
1516

1617
i <- NULL
@@ -31,11 +32,7 @@ m1 <- matrix(c(1,0,0,0,
3132
0,0,1,0,
3233
1,0,0,1), nrow = 4, ncol = 4)
3334

34-
35-
3635
m1
37-
38-
3936
r1 <- makeCacheMatrix(m1)
4037
r1$get()
4138
r2 <- makeCacheMatrix(m1)

0 commit comments

Comments
 (0)