Programmer Guide/Command Reference/EVAL/vv: Difference between revisions
From STX Wiki
< Programmer Guide | Command Reference | EVAL
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
Create a vector by concatenating the arguments (scalars and vectors). | Create a vector by concatenating the arguments (scalars and vectors). | ||
;Usage: <code>vv(x1</var> {, <var>x2</var> {, ...}})</code>''' | ;Usage: '''<code><var>vv(x1</var> {, <var>x2</var> {, ...}})</code>''' | ||
:;<var>x1</var>, <var>x2</var>, ...: each argument can be a scalar or a vector | :;<var>x1</var>, <var>x2</var>, ...: each argument can be a scalar or a vector | ||
;Result: The concatenated vector. | ;Result: The concatenated vector. |
Revision as of 13:26, 4 April 2011
Create a vector by concatenating the arguments (scalars and vectors).
- Usage
vv(x1 {, x2 {, ...}})
- x1, x2, ...
- each argument can be a scalar or a vector
Example:
#a := eval vv(1,2,4,8,16) // -> #a = { 1 , 2 , 4 , 8 , 16 } #b := eval vv(0 , $#a , 32) // -> #b = { 0 , 1 , 2 , 4 , 8 , 16 , 32 }