R/ones.R
ones.Rd
Create a matrix of ones of size (dim1 x dim2).
ones(dim1, dim2 = NULL)
The dimension of the matrix (if square) or the number of rows.
The number of columns
A matrix of ones
Other MATLAB: cell(), diag_matlab(), feval(), fileparts(), isempty(), rand(), randn(), size(), tic(), toc(), zeros()
cell()
diag_matlab()
feval()
fileparts()
isempty()
rand()
randn()
size()
tic()
toc()
zeros()
ones(4) #> [,1] [,2] [,3] [,4] #> [1,] 1 1 1 1 #> [2,] 1 1 1 1 #> [3,] 1 1 1 1 #> [4,] 1 1 1 1 ones(3,4) #> [,1] [,2] [,3] [,4] #> [1,] 1 1 1 1 #> [2,] 1 1 1 1 #> [3,] 1 1 1 1