File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 1
1
# WEEK3 ~ ASSIGNMENT
2
- # by John Barker
2
+ # by battez
3
3
# cachematrix.R
4
4
# Pair of functions which cache the inverse of a matrix.
5
5
# example usage:
6
6
# cacheSolve(makeCacheMatrix(x = someInvertibleMatrix))
7
7
#
8
- # The first function, makeCacheMatrix creates a special "matrix" object, makes a function to
8
+ # The first function, makeCacheMatrix creates a special "matrix" object, returning a list with
9
+ # functions to
9
10
# set - the value of the matrix & reset cache
10
11
# get - the value of the matrix object
11
12
#
12
- # set - the value of the matrix that is the inverse of matrix x
13
- # get - ditto
13
+ # setinverse - sets the value of the matrix that is the inverse of matrix x
14
+ # getinverse - gets the value of the matrix that is the inverse of matrix x
14
15
#
15
16
makeCacheMatrix <- function (x = matrix ()) {
16
17
@@ -30,8 +31,8 @@ makeCacheMatrix <- function(x = matrix()) {
30
31
# simple getting of x.
31
32
get <- function () x
32
33
33
- # function that sets i (again, looks in another environment) to the "solved" passed
34
- setinverse <- function (solved ) i <<- solved
34
+ # function that sets i to the "solved" passed to it
35
+ setinverse <- function (solved ) i <<- solved
35
36
36
37
# returns the inverse
37
38
getinverse <- function () i
You can’t perform that action at this time.
0 commit comments