Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ecaf317

Browse files
committed
Update cachematrix.R
start
1 parent 7f657dd commit ecaf317

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cachematrix.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
## Put comments here that give an overall description of what your
22
## functions do
3+
# Matrix inversion is usually a costly computation and there may be some benefit to caching the inverse of a matrix rather than compute it repeatedly (there are also alternatives to matrix inversion that we will not discuss here). Your assignment is to write a pair of functions that cache the inverse of a matrix.
34

45
## Write a short comment describing this function
6+
# makeCacheMatrix: This function creates a special "matrix" object that can cache its inverse.
7+
8+
#
59

610
makeCacheMatrix <- function(x = matrix()) {
711

812
}
913

1014

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

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

0 commit comments

Comments
 (0)