Skip to content

Commit ad4258c

Browse files
committed
Added header comments
1 parent bef8420 commit ad4258c

1 file changed

Lines changed: 18 additions & 3 deletions

File tree

cachematrix.R

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,25 @@ if (!is.element('MASS', installed.packages()[,1]))
1111
library(MASS)
1212

1313

14-
## Put comments here that give an overall description of what your
15-
## functions do
14+
## Below are two functions that are used to create a special object that stores
15+
## a numeric matrix and cache it's inverse
16+
17+
# For example the following code sets matrix c,
18+
# c=rbind(c(1, -1/4), c(-1/4, 1))
19+
# And x<- makeCacheMatrix(c) to init the object list
20+
# After this, the call to solve the matrix, gives
21+
# the inverse of the original c matrix
22+
# cacheSolve(x) , calculates the inverse matrix of c
23+
# If it is called again, inverse is get from the cache
24+
25+
26+
## The first function, makeCacheMatrix creates a list containing a function to
27+
## - set the values from input matrix
28+
## - get the values of currently stored matrix
29+
## - set the values of the inverse matrix
30+
## - get the values of the inverse matrix
31+
1632

17-
## Write a short comment describing this function
1833

1934
makeCacheMatrix <- function(x = matrix()) {
2035

0 commit comments

Comments
 (0)