R/mkconstarray.R

Defines functions mkconstarray

###
### $Id: mkconstarray.R 29 2022-05-30 23:02:22Z proebuck $
###
### Create a constant array of specified class.
###


##-----------------------------------------------------------------------------
mkconstarray <- function(class.type = c("character",
                                        "complex",
                                        "double",
                                        "integer",
                                        "logical",
                                        "numeric"),
                         value,
                         size) {
     matlab::repmat(as(value, match.arg(class.type)), size)
}

Try the matlab package in your browser

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

matlab documentation built on July 1, 2024, 5:07 p.m.