David
Farruggio

MathGenie

ones

Create array of all ones

Syntax and Description

ones returns the scalar 1.
ones() returns the scalar 1.
ones(n) returns an n-by-n matrix of ones.
ones(m,n) returns an m-by-n matrix of ones.
ones([m,n]) returns an m-by-n matrix of ones.

Back to functions