Algosim documentation: cols

cols

Returns the columns of a matrix as a list of vectors.

Syntax

Description

If A is a matrix, then cols(A) is the list of columns of A, each column being represented by a vector.

Examples

A ≔ ❨❨2, 1, −i❩, ❨1, 0, 2❩, ❨4, i, 2❩, ❨0, 1, −1❩❩
⎛ 2   1  −i⎞
⎜ 1   0   2⎟
⎜ 4   i   2⎟
⎝ 0   1  −1⎠
cols(A)
(2, 1, 4, 0)
(1, 0, i, 1)
(−i, 2, 2, −1)

See also