Algosim documentation: ComplexMatrix

ComplexMatrix

Converts an object to a complex matrix.

Syntax

Description

If X is any object, then ComplexMatrix(X) returns X as a complex matrix, if possible.

Specifically,

Examples

ComplexMatrix(❨4, i, 2❩)
⎛4⎞
⎜i⎟
⎝2⎠
ComplexMatrix("1 + i, 2 − 2⋅i, 3 + 2⋅i"~¶~"5, 6 − 3⋅i, i")
⎛  1 + i  2 − 2⋅i  3 + 2⋅i⎞
⎝      5  6 − 3⋅i        i⎠
ComplexMatrix(compute(√(a⋅b), a, −2, 2, b, −2, 2))
⎛              2    1.41421356237                0  1.41421356237⋅i              2⋅i⎞
⎜  1.41421356237                1                0                i  1.41421356237⋅i⎟
⎜              0                0                0                0                0⎟
⎜1.41421356237⋅i                i                0                1    1.41421356237⎟
⎝            2⋅i  1.41421356237⋅i                0    1.41421356237                2⎠

See also