R/matlab_package_functions.R

Defines functions ones zeros

Documented in ones zeros

#' Matrix to create zeros
#'
#' @param n size of the matrix
#'
#' @return a square matrix of zeros
zeros <- function(n) {
  return(matrix(0,n,n))

}

#' Returns an Identity matrix
#'
#' @param n size of the matrix
#'
#' @return a identity matrix 
ones <- function(n) {
  return(matrix(1,n,n))
}

Try the markovchain package in your browser

Any scripts or data that you put into this service are public.

markovchain documentation built on Sept. 24, 2023, 5:06 p.m.