ones()
Returns ones matrix
Syntax
y = ones(rows, columns)
Arguments
| Name | Description | Range | Type | Required |
|---|---|---|---|---|
| rows | number of rows † | [i, ∞) | integer | yes |
| columns | number of columns † | [i, ∞) | integer | no |
| † If only one argument is supplied, then a square matrix is returned. If two are supplied, then a matrix of ones with size rows X cols is returned | ||||
Examples
a = ones(2)
returns 1, 1}, {1, 1
Defined in
Built in
See Also
Privacy
Statement
|
Terms of Use
|
Legal |
Contact Us
|
© Agilent 2000-2008 ![]()