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

From STX Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 3: Line 3:
;Usage: '''<code><var>vmcol(x1</var> {, <var>x2</var> {, .. }})</code>'''
;Usage: '''<code><var>vmcol(x1</var> {, <var>x2</var> {, .. }})</code>'''
:;<var>x1</var>, <var>x2</var>, ..: source vectors and/or matrices with the same number of rows
:;<var>x1</var>, <var>x2</var>, ..: source vectors and/or matrices with the same number of rows
;Result: A matrix with <code>nrow(''x1'')</code> rows. The columns of arguments are merged from left to right.
;Result: A matrix with <code>nrow(''x1'')</code> rows. The columns of the arguments are merged from left to right.
;See also: [[Programmer_Guide/Command_Reference/EVAL/vv|vv]], [[Programmer_Guide/Command_Reference/EVAL/vvset|vvget]], [[Programmer_Guide/Command_Reference/EVAL/vvset|vvset]], [[Programmer_Guide/Command_Reference/EVAL/vvcat|vvcat]], [[Programmer_Guide/Command_Reference/EVAL/vmrow|vmrow]], [[Programmer_Guide/Command_Reference/EVAL/vsubn|vsubn]], [[Programmer_Guide/Command_Reference/EVAL/vsubc|vsubc]]
;See also: [[Programmer_Guide/Command_Reference/EVAL/vv|vv]], [[Programmer_Guide/Command_Reference/EVAL/vvset|vvget]], [[Programmer_Guide/Command_Reference/EVAL/vvset|vvset]], [[Programmer_Guide/Command_Reference/EVAL/vvcat|vvcat]], [[Programmer_Guide/Command_Reference/EVAL/vmrow|vmrow]], [[Programmer_Guide/Command_Reference/EVAL/vsubn|vsubn]], [[Programmer_Guide/Command_Reference/EVAL/vsubc|vsubc]]



Revision as of 09:33, 6 April 2011

Create a matrix by merging columns of source vectors and/or matrices.

Usage
vmcol(x1 {, x2 {, .. }})
x1, x2, ..
source vectors and/or matrices with the same number of rows
Result
A matrix with nrow(x1) rows. The columns of the arguments are merged from left to right.
See also
vv, vvget, vvset, vvcat, vmrow, vsubn, vsubc

Example:

#a := eval vv(1,2,3,4,5)
#b := eval init(5,2,0)
#c := eval vmcol($#a, $#b, $#a) 
// -> $#c is a matrix with 5 rows and 4 columns:
//    $#c[*,0] = $#a,  #c[*,1] = $#b[*,0],  $#c[*,2] = $#b[*,1],  $#c[*,3] = $#a

<function list>



vmcol
vmcol(x1M, x2M,...) Create a matrix using the matrices x1M, x2M,... (the matrices must have the same number of rows as arguments).
vmcol(x1V, x2V,...) Create a matrix using the vectors x1v, x2v, .. (vectors with the same length) - one vector per column.The result is: a matrix (the number of vector elements * the number of vectors)

Navigation menu

Personal tools