ones¶
ones creates a real matrix with all elements set to the value 1.0.
- rmOnes = ones(nRows, nColumns)
- rmOnes = ones(rvSize)
Return Value
rmOnes is a real matrix with the size nRows by nColumns with all elements set to 1.0.
Parameters
- nRows
nRows is the number of rows.
- nColumns
nColumns is the number of columns.
- rvSize
rvSize is a vector with two elements. rvSize[1] is the number of rows and rvSize[2] is the number of columns.
Example
* m1 = [1,2,3]
* m1 = [m1, ones(1,7)] // 7 Einsen an den Vektor m1 anhängen.
* // erzeuge Einsvektor von der gleichen Größe des Vektors m1
* m2 = ones(size(m1));
id-694358