Skip to content

Commit 69cdb99

Browse files
committed
adding comments after testing to verify everything works
1 parent aa8e8d4 commit 69cdb99

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

cachematrix.R

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
## Put comments here that give an overall description of what your
2-
## functions do
1+
## This is Programming Assignment 2 for the R Progrmming Coursera class demonstrating Lexical Scoping
32

4-
## Write a short comment describing this function
3+
## Function makeCacheMatrix creates a vector of functionss that
4+
## - Set the value of a matrix
5+
## - Gets the value of the matrix
6+
## - Calculates the inverse of said matrix
7+
## - Gets the inverse of said matrix
58

69
makeCacheMatrix <- function(X = matrix()) {
710
M <- NULL
@@ -16,7 +19,13 @@ makeCacheMatrix <- function(X = matrix()) {
1619
}
1720

1821

19-
## Write a short comment describing this function
22+
## Function cacheSolve calcultes the inverse of the matric created with
23+
## makeCacheMatrix. If the inverse has already been calculated, it
24+
## retrives it from cache. Otherwise it calculates it via the setSolve
25+
## function.
26+
27+
## Note : the native R function solve(A) (see help(solve) for more info)
28+
## is used to calculate the inverse of a matrix A
2029

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

0 commit comments

Comments
 (0)