FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
ProgrammingAssignment2/makeCacheMatrix.r at master · jbin2012/ProgrammingAssignment2 · GitHub
jbin2012
/
ProgrammingAssignment2
Public
forked from
rdpeng/ProgrammingAssignment2
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
ProgrammingAssignment2
/
makeCacheMatrix.r
Copy path
More file actions
More file actions
Latest commit
History
History
History
19 lines (18 loc) · 1.08 KB
Breadcrumbs
ProgrammingAssignment2
/
makeCacheMatrix.r
Copy path
File metadata and controls
19 lines (18 loc) · 1.08 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#
# This function will take a matrix as input and create four functions that retrive the matrix
#
# from a cache and allow other functions to operate on the cached matrix.
#
# The functions defined within the funtion permit, cacheing a matrix, retriving a matrix,
#
# cache the inverse of the matrix, and retrive the inverse of the matrix.
#
# This function only sets up other functions. It does not perform any mathmatical operations
makeCacheMatrix
<-
function
(
x
=
matrix
()) {
m
<-
NULL
setmat
<-
function
(
y
) {
#
#this function is used to set the matrix using the R prompt
x
<<-
y
#
#and the $ operator
m
<<-
NULL
}
getmat
<-
function
()
x
#
#this function retrives the cached matrix usign the R prompt and the $ operator
setsolve
<-
function
(
invMat
)
m
<<-
invMat
#
#this function can be used to cache the inverse of the matrix
getsolve
<-
function
()
m
#
#this function retrives the cached matrix inverse
list
(
setmat
=
setmat
,
getmat
=
getmat
,
setsolve
=
setsolve
,
getsolve
=
getsolve
)
}
Back
|
FazBrowse Home
|
New Git URL