File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 5
5
# # cacheSolve(cachedMatrix)
6
6
7
7
8
- # # This function generates an Object that holds a matrix and it's
8
+ # # This function generates a cacheMatrix object that holds a matrix and it's
9
9
# # possibily cached inverse. In order to calculate the inverse using caching
10
- # # use the cacheSolve method.
10
+ # # use the cacheSolve function.
11
+ # # To construct a cachedMatrix, pass a matrix:
12
+ # # cachedMatrix <- makeCacheMatrix(matrix(1:4,2,2))
13
+
11
14
makeCacheMatrix <- function (x = matrix ()) {
12
15
inverse <- NULL
13
16
set <- function (y ) {
@@ -28,6 +31,8 @@ makeCacheMatrix <- function(x = matrix()) {
28
31
# # which was constructed my using the makeCacheMatrix function.
29
32
# # The First call calculates the inverse, every succeeding call
30
33
# # uses the cached inverse.
34
+ # # To calculate the inverse pass the cacheMatrix object:
35
+ # # cacheSolve(cachedMatrix)
31
36
32
37
cacheSolve <- function (x , ... ) {
33
38
i <- x $ getinverse()
You can’t perform that action at this time.
0 commit comments