ones: Create a matrix of ones

View source: R/ones.R

onesR Documentation

Create a matrix of ones

Description

Create a matrix of ones of size (dim1 x dim2).

Usage

ones(dim1, dim2 = NULL)

Arguments

dim1

The dimension of the matrix (if square) or the number of rows.

dim2

The number of columns

Value

A matrix of ones

See Also

Other MATLAB: cell(), diag_matlab(), feval(), fileparts(), isempty(), rand(), randn(), size(), tic(), toc(), zeros()

Examples


ones(4)
ones(3,4)

PopED documentation built on Oct. 8, 2024, 1:07 a.m.