8000 Assignment · 013b5b79/ProgrammingAssignment2@c1d773d · GitHub
[go: up one dir, main page]

Skip to content

Commit c1d773d

Browse files
committed
Assignment
Edit rdpeng#3
1 parent c7414fb commit c1d773d

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

cachematrix.R

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
## Put comments here that give an overall description of what your
2-
## functions do
3-
4-
## Write a short comment describing this function
1+
## This function, makeCacheMatrix, creates a special "matrix", which is a list containing
2+
## a function to:
3+
## 1. set the value of the matrix
4+
## 2. get the value of the matrix
5+
## 3. set the value of the inverse of a matrix
6+
## 4. get the value of the inverse of a matrix
57

68
makeCacheMatrix <- function(x = matrix()) {
79
matinv <- NULL
@@ -18,7 +20,9 @@ makeCacheMatrix <- function(x = matrix()) {
1820
}
1921

2022

21-
## Write a short comment describing this function
23+
## This function, cacheSolve, computes the inverse of the special "matrix" returned by makeCacheMatrix above.
24+
## If the inverse has already been calculated (and the matrix has not changed), then the cachesolve should
25+
## retrieve the inverse from the cache.
2226

2327
cacheSolve <- function(x, ...) {
2428
## Return a matrix that is the inverse of 'x'

0 commit comments

Comments
 (0)
0