Wilang Documentation1.0.0+4

flatten#

Flatten a multi dimensional matrix into a single dimensional matrix.

Available in: math cells, REPL.

Syntax#

flatten(x)

Arguments and behavior#

For matrices, dimensions must match the operation. Singular matrices or incompatible shapes can fail. Cell indexing starts at 1. The example returns matrix.

Example#

Edit the inputs, then use Run or Reset. Changes stay in this example.

Example
a = [1, 2, 3; 4, 5, 6]
b = flatten(a)

Expected result: matrix.

See also#

concat · size · squeeze

All functions · Math guides