|
|
| Line 10: |
Line 10: |
|
| |
|
| [[Programmer_Guide/Command_Reference/EVAL#Functions|<function list>]] | | [[Programmer_Guide/Command_Reference/EVAL#Functions|<function list>]] |
|
| |
|
| |
| =====Parameters:=====
| |
|
| |
| ;<var>rows</var>
| |
|
| |
| :The number of rows. There is no default.
| |
|
| |
| ;<var>cols</var>
| |
|
| |
| :The number of columns. The default is <code>1</code>.
| |
|
| |
| ;<var>value</var>
| |
|
| |
| :The value to initialize with. The default is <code>0</code>.
| |
|
| |
| =====Return Type:=====
| |
|
| |
| vector or matrix
| |
| ;See also: [[Programmer_Guide/Command_Reference/EVAL/fill|fill]], [[Programmer_Guide/Command_Reference/EVAL/rand|rand]],
| |
Revision as of 13:15, 4 April 2011
Create a vector or a matrix and initialize it with a particular value.
- Usage
init(n {, m {, v}})
- n
- number of rows, n>1
- m
- number of columns, m>=1 (default=1)
- v
- initialization value (default=0)
- All arguments are scalars!
- Result
- The result is a numerical object with n rows and m columns. All elements are set to v.
- See also
- init, rand
<function list>