File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change 1
1
# # These functions provide a way to create an inverted matrix, and everytime
2
2
# # thereafter return a cached version of the matrix until another
3
- # # matrix is inverted .
3
+ # # matrix is set .
4
4
5
- # # This function provides access to set and get a cached version of a matrix.
5
+ # ############################################################################
6
+ # # makeCacheMatrix: This function provides access to set and get a cached
7
+ # # version of a matrix.
6
8
9
+ # # x | matrix | The matrix to be set
10
+
11
+ # # return list containing different functions used to get/set matrix
12
+ # ############################################################################
7
13
makeCacheMatrix <- function (x = matrix ()) {
8
14
im <- NULL
9
15
set <- function (y ) {
@@ -18,11 +24,15 @@ makeCacheMatrix <- function(x = matrix()) {
18
24
getsolve = getsolve )
19
25
}
20
26
21
-
22
- # # This function returns an inverse of the matrix given to the makeCacheMatrix
27
+ # ############################################################################
28
+ # # cacheSolve: This function returns an inverse of the matrix given to the makeCacheMatrix
23
29
# # function. If the matrix has already been inverted and cached, it will return
24
30
# # the cached version, otherwise, it will invert and then cache the matrix.
25
31
32
+ # # x | list | The list of functions used to get/set matrix
33
+
34
+ # # return inverted matrix
35
+ # ############################################################################
26
36
cacheSolve <- function (x , ... ) {
27
37
m <- x $ getsolve()
28
38
if (! is.null(m )) {
You can’t perform that action at this time.
0 commit comments