Vector and Matrix Constructor Operator

Returns the object containing the components of the comma-separated list [x1,...,xn]. One-dimensional arrays are returned as VECTOR, MATRIX types are defined by linewise inputs: .

optiSLang uses 0-based indexing. It therefore follows that the first component is the zeroth element of the new object.

Syntax

[x1,...,xn]

Types
 Variable NameValue TypeVariable Type
Arguments:x1 real, complexscalar, vector
:  
xn real, complexscalar, vector
Result:  real, complex vector, matrix
Calculator Input

Use the [] or [[],[]] buttons to complete the operation.

Examples

Vectors:

IDDescriptionTypeValueExpression
x1ArgumentREAL33
x2ArgumentCOMPLEX REAL

cplx(2,3)
z Result COMPLEX REAL VECTOR

[x1, x2]

Matrices:

IDDescriptionTypeValueExpression
x1ArgumentREAL VECTOR

[1, 2]
x2ArgumentCOMPLEX REAL VECTOR

[cplx(1,2), cplx(2,3)]
x3ArgumentREAL MATRIX

[[1,2,3],[4,5,6]]
z Result COMPLEX REAL MATRIX

[x1, x2]