File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change 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
3
2
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
5
8
6
9
makeCacheMatrix <- function (X = matrix ()) {
7
10
M <- NULL
@@ -16,7 +19,13 @@ makeCacheMatrix <- function(X = matrix()) {
16
19
}
17
20
18
21
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
20
29
21
30
cacheSolve <- function (X , ... ) {
22
31
# # Return a matrix that is the inverse of 'x'
You can’t perform that action at this time.
0 commit comments