Skip to content

Commit 3ce300d

Browse files
improve comments
1 parent db6d076 commit 3ce300d

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

cachematrix.R

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
## Put comments here that give an overall description of what your
2-
## functions do
3-
4-
## Write a short comment describing this function
1+
## This pair of functions will calculate and cache the inverse of an invertible matrix
52

3+
## `makeCacheMatrix` accepts an invertible matrix and contains methods to cache inverse value
64
makeCacheMatrix <- function(x = matrix()) {
75
# first make a local variable `im` for the inverse matrx
86
im <- NULL
@@ -25,9 +23,8 @@ makeCacheMatrix <- function(x = matrix()) {
2523
}
2624

2725

28-
## Write a short comment describing this function
29-
## assume matrix `x` is always invertable
30-
26+
## `cacheSolve` accepts an makeCacheMatrix and caclulates the inverted matrix
27+
## or retrieves the cached matrix
3128
cacheSolve <- function(x, ...) {
3229
## Return a matrix that is the inverse of 'x'
3330
# `x` is a matrix

0 commit comments

Comments
 (0)