File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 11# # Put comments here that give an overall description of what your
22# # functions do
33
4- # # Write a short comment describing this function
4+ # # Function makeCacheMatrix creates a matrix
5+ # # object that precalculates the inverse of a square matrix
56makeCacheMatrix <- function (x = matrix ()) {
67 m <- NULL
78 set <- function (y ) {
@@ -16,7 +17,8 @@ makeCacheMatrix <- function(x = matrix()) {
1617 getsolve = getsolve )
1718}
1819
19- # # Write a short comment describing this function
20+ # # Calculates the inverse of a square matrix if not already
21+ # # Cached
2022cacheSolve <- function (x , ... ) {
2123 m <- x $ getsolve()
2224 if (! is.null(m )) {
@@ -27,4 +29,4 @@ cacheSolve <- function(x, ...) {
2729 m <- solve(data )
2830 x $ setsolve(m )
2931 m
30- }
32+ }
You can’t perform that action at this time.
0 commit comments