Changed base Matlab function behavior

This commit is contained in:
Waldir Leoncio 2020-07-28 15:35:29 +02:00
parent 2f809d01df
commit c9ff8e76a9

View file

@ -6,10 +6,10 @@
#' @return An array of zeroes with the dimensions passed on call
cell <- function(n, sz = c(n, n), ...) {
if (length(sz) == 1 & missing(...)) {
return(array(dim = c(n, sz)))
return(array(0, dim = c(n, sz)))
} else if (length(sz) == 2) {
return(array(dim = sz))
return(array(0, dim = sz))
} else {
return(array(dim = c(n, sz, ...)))
return(array(0, dim = c(n, sz, ...)))
}
}