File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 1
- # # Put comments here that give an overall description of what your
2
- # # functions do
1
+ # # Matrix inversion is usually a costly computation and there may be some benefit to
2
+ # # caching the inverse of a matrix rather than compute it repeatedly
3
+ # # These functions cache the inverse of a matrix.
3
4
4
- # # Write a short comment describing this function
5
+ # # This function creates a special "matrix" object that can cache its inverse.
5
6
6
7
makeCacheMatrix <- function (x = matrix ()) {
7
8
i <- NULL
@@ -18,7 +19,9 @@ makeCacheMatrix <- function(x = matrix()) {
18
19
}
19
20
20
21
21
- # # Write a short comment describing this function
22
+ # # This function computes the inverse of the special "matrix" returned by makeCacheMatrix above.
23
+ # # If the inverse has already been calculated (and the matrix has not changed),
24
+ # # then the cacheSolve should retrieve the inverse from the cache.
22
25
23
26
cacheSolve <- function (x , ... ) {
24
27
# # Return a matrix that is the inverse of 'x'
You can’t perform that action at this time.
0 commit comments