Skip to content
This repository was archived by the owner on May 21, 2020. It is now read-only.
Florian Rappl edited this page Dec 21, 2014 · 2 revisions

ones

Generates a matrix with only ones.

ones()

Generates a 1x1 matrix.

Returns 1. entry

Matrix

ones(dim)

Generates an n-dimensional matrix with only ones.

Argument dim

Scalar

Returns 1. entry

Matrix

Example

ones(5)

Returns a 5x5 matrix with 1 in each cell.

ones(rows,cols)

Generates a n-by-m matrix with only ones.

Argument rows

Scalar

Argument cols

Scalar

Returns 1. entry

Matrix

Example

ones(5,2)

Returns a 5x2 matrix with 1 in each cell.

Clone this wiki locally