Skip to content

Commit 2ae6fc1

Browse files
author
Oliver Ochs
committed
Added an example
1 parent 4f5e5c2 commit 2ae6fc1

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,21 @@ In order to complete this assignment, you must do the following:
103103
### Grading
104104

105105
This assignment will be graded via peer assessment.
106+
107+
### Using it
108+
109+
> source('cachematrix.R')
110+
> c=rbind(c(1, -1/4), c(-1/4, 1)) ## create a matrix
111+
> cc <- makeCacheMatrix(c) ## create a cache matrix
112+
> cacheSolve(cc) ## uncached
113+
[,1] [,2]
114+
[1,] 1.0666667 0.2666667
115+
[2,] 0.2666667 1.0666667
116+
117+
> cacheSolve(cc)
118+
found cached inverse matrix
119+
[,1] [,2]
120+
[1,] 1.0666667 0.2666667
121+
[2,] 0.2666667 1.0666667
122+
123+

0 commit comments

Comments
 (0)