Skip to content

Instantly share code, notes, and snippets.

View cmrosinus-debug's full-sized avatar

cmrosinus-debug

View GitHub Profile
@cmrosinus-debug
cmrosinus-debug / cachematrix.R
Created January 28, 2026 21:48
cachematrix creates a randomly sized square matrix, with side lengths ranging between 3 - 50, then returns the inverse of that matrix.
## makeCacheMatrix will create an invertible matrix. Then cacheSolve
## will check for stored matrixes, retrieve, & solve.
## makeCacheMatrix creates a matrix that can be inverted
makeCacheMatrix <- function(x = matrix()) {
##In order to invert matrix, it must be a square matrix of any size: n * n
## to make things simpler, I will give a range of 3:50
n<-sample(3:50,1)
n