Initialize a matrix. All elements are set to one.
Syntax |
Description |
---|---|
x = ones(i,j,k,....); |
Initializes an i x j x k x .... matrix. |
Examples
?x=ones(2,2,2); result(i,j,1): 1 1 1 1 result(i,j,2): 1 1 1 1
See Also
List of commands , linspace , matrix , zeros , []