Programmer Guide/Command Reference/EVAL/init: Difference between revisions
From STX Wiki
< Programmer Guide | Command Reference | EVAL
Jump to navigationJump to search
m (1 revision: Initial import) |
No edit summary |
||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:{{SUBPAGENAME}}}} | {{DISPLAYTITLE:{{SUBPAGENAME}}}} | ||
Create a vector or a matrix and initialize it with a particular value. | |||
;Usage: <code>init(<var>rows</var> {, <var>cols</var> {, <var>value</var>}})</code> | |||
Create a vector or a matrix and initialize it with a particular value. | |||
<code>init(<var>rows</var>, <var>cols</var>, <var>value</var>)</code> | |||
=====Parameters:===== | =====Parameters:===== | ||
Line 25: | Line 20: | ||
vector or matrix | vector or matrix | ||
;See also: [[Programmer_Guide/Command_Reference/EVAL/fill|fill]], [[Programmer_Guide/Command_Reference/EVAL/rand|rand]], |
Revision as of 13:10, 4 April 2011
Create a vector or a matrix and initialize it with a particular value.
- Usage
init(rows {, cols {, value}})
Parameters:
- rows
- The number of rows. There is no default.
- cols
- The number of columns. The default is
1
.
- value
- The value to initialize with. The default is
0
.
Return Type:
vector or matrix