R/zeros_ones.R
ones.Rd
wrapper of zeros_or_ones() that replicates the behavior of the ones() function on Matlab
zeros_or_ones()
ones()
ones(n1, n2 = n1, ...)
number of rows
number of columns
extra dimensions
An n1-by-n2 matrix of ones
ones(3) #> [,1] [,2] [,3] #> [1,] 1 1 1 #> [2,] 1 1 1 #> [3,] 1 1 1 ones(8, 1) #> [,1] #> [1,] 1 #> [2,] 1 #> [3,] 1 #> [4,] 1 #> [5,] 1 #> [6,] 1 #> [7,] 1 #> [8,] 1