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

From STX Wiki
Jump to navigationJump to search
No edit summary
No edit summary
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
Create a vector by concatenating the arguments (scalars and vectors).
Create a vector by concatenating the arguments (scalars and vectors).
;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
;Result: The concatenated vector.
;See also: [[../vvget|vvget]], [[../vvset|vvset]], [[../vvcat|vvcat]], [[../vmcol|vmcol]], [[../vmrow|vmrow]], [[../vsubn|vsubn]], [[../vsubc|vsubc]]


=====Usage:=====
[[../#Functions|<function list>]]


<code>vv(<var>x1</var>, <var>x2</var>,...)</code>
=====Result:=====
The result is { <var>x1</var> , <var>x2</var> , ... }
=====Return Type:=====
vector
=====Examples:=====


Example:
<pre>
<pre>
#v := eval vv(1,2,4,8,16)
#a := eval vv(1,2,4,8,16)
showitem $#v
// -> #a = { 1 , 2 , 4 , 8 , 16 }
#b := eval vv(0 , $#a , 32)
// -> #b = { 0 , 1 , 2 , 4 , 8 , 16 , 32 }
</pre>
</pre>

Latest revision as of 12:13, 21 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
Result
The concatenated vector.
See also
vvget, vvset, vvcat, vmcol, vmrow, vsubn, vsubc

<function list>


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 }

Navigation menu

Personal tools