Programmer Guide/Command Reference/EVAL/init: Difference between revisions

From STX Wiki
Jump to navigationJump to search
m (1 revision: Initial import)
No edit summary
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
=====init=====
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. This is a subcommand of the <code>[[Programmer Guide/Command Reference/EVAL/EVAL|EVAL]]</code> command.
 
=====Usage:=====
 
<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

See also
fill, rand,

Navigation menu

Personal tools