Member of the matrix class.
c = ones(a)
c = ones(a, b)
c = ones([a, b])
Generates a matrix of ones.
| Name | Description |
| a | Specifies the number of rows in c. a is a positive integer. |
| b | Specifies the number of columns in c. b is a positive integer. |
| Name | Description |
| c | Returns an a-by-b matrix whose elements are all 1s. If you do not specify b, c returns a square matrix of order a. |
C = ones(3, 5)