You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Put comments here that give an overall description of what your
2
2
## functions do
3
3
4
-
## Write a short comment describing this function
4
+
## This function creates a special "matrix" object that can cache its inverse.
5
5
6
6
makeCacheMatrix<-function(x=matrix()) {
7
-
7
+
s<-NULL
8
+
set<-function(y) {
9
+
x<<-y
10
+
s<<-NULL
11
+
}
12
+
get<-function() x
13
+
setsolve<-function(solve) s<<-solve
14
+
getsolve<-function() s
15
+
list(set=set, get=get,
16
+
setsolve=setsolve,
17
+
getsolve=getsolve)
8
18
}
9
19
10
20
11
-
## Write a short comment describing this function
21
+
## This function computes the inverse of the special "matrix" returned by makeCacheMatrix above. If the inverse has already been calculated (and the matrix has not changed), then the cachesolve should retrieve the inverse from the cache.
0 commit comments