vertical

Prev Next

Function Names

vertical

Description

Converts a vector (set) or (horizontal 1D) matrix (nested set) to a vertical 1D-matrix. In other words: Moves all parameter elements of set one deeper, so every parameter element is embedded in its own set.

The matrices may contain contents of all data types and not just numerals.

Call as: function

Restrictions

Indirect parameter passing is disabled

Parameter count

1

Parameters

No.TypeDescription
1
input
set
matrix
Matrix

Vector or matrix to change to a vertical matrix

Return value

TypeDescription
matrix Vertical matrix

Examples

               echo( vertical ( {1,2,abc } ) );     // returns { {1},{2},{abc} }
               echo( vertical( {{1},{2},{abc}} ) ); // Same (is already a vertical matrix)
               echo( vertical( {{1,2,abc}} ) );     // Same (horizontal to vertical matrix)
               echo( vertical( { } ) );             // returns { }  (empty set)

Output

{{1},{2},{'abc'}}
{{1},{2},{'abc'}}
{{1},{2},{'abc'}}
{}
Try it yourself: Open LIB_Function_vertical.b4p in B4P_Examples.zip. Decompress before use.

See also

horizontal
flat
diagonal