File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -34,3 +34,25 @@ cachemean <- function(x, ...) {
34
34
x $ setmean(m )
35
35
m
36
36
}
37
+
38
+ # #######
39
+ # Matrix inversion is usually a costly computation and
40
+ # their may be some benefit to caching the inverse of a matrix
41
+ # rather than compute it repeatedly (there are also alternatives to matrix inversion that we will not discuss here).
42
+ # #######
43
+
44
+ # makeCacheMatrix: This function creates a special "matrix" object that can cache its inverse.
45
+ makeCacheMatrix <- function (){
46
+
47
+ }
48
+
49
+
50
+ # cacheSolve: This function computes the inverse of the special "matrix" returned by makeCacheMatrix above.
51
+ # If the inverse has already been calculated (and the matrix has not changed),
52
+ # then the cachesolve should retrieve the inverse from the cache.
53
+ cacheSolve <- function (){
54
+ # Computing the inverse of a square matrix can be done with the solve function in R.
55
+ # For example, if X is a square invertible matrix, then solve(X) returns its inverse.
56
+
57
+
58
+ }
You can’t perform that action at this time.
0 commit comments