Contents Previous Next Subchapters

Creating a Matrix of Ones (Mlmode)
Syntax ones(m)
ones([mn])
ones(mn)
See Also ones , fill , zeros

Description
Returns an double-precision matrix of ones with the specified dimension, where m is a scalar specifying the number of rows in the return value, and n, if present, is a scalar specifying the number of columns in the return value. If n is not present, an m by m matrix is returned. The arguments n and m can be integer, real or double-precision.

Example
If in Mlmode you enter
     ones(2, 3)
O-Matrix will reply
     {
     [ 1 , 1 , 1 ]
     [ 1 , 1 , 1 ]
     }