Generates a matrix of ones

Share:

Description

ones generates a matrix of ones.

Usage

1
ones(n, p = n)

Arguments

n

number of rows

p

number of columns

Details

if only n is specified, the resulting matrix will be square.

Value

a matrix filled with ones.

Author(s)

Jan Graffelman (jan.graffelman@upc.edu)

See Also

matrix

Examples

1
2
Id <- ones(3)
print(Id)