horizontal
Converts a vector (set) or (vertical 1D) matrix (nested set) to a horizontal 1D-matrix. In other words: The 2-level set structure is
flattened and then all of contents is pushed into a 2nd level so the result looks always like {{ a,b,c,... }}.
The matrices may contain contents of all data types and not just numerals.
Indirect parameter passing is disabled
1
No. | Type | Description |
---|---|---|
1 input |
set matrix |
Matrix Vector or matrix to change to a horizontal matrix |
Type | Description |
---|---|
matrix | Horizontal matrix |
echo( horizontal ( {1,2,abc } ) ); // returns {{1,2,abc}}
echo( horizontal( {{1},{2},{abc}} ) ); // Same (vertical to horizontal matrix)
echo( horizontal( {{1,2,abc}} ) ); // Same (is already a horizontal matrix)
echo( horizontal( { } ) ); // returns { } (empty set)
{{1,2,'abc'}}
{{1,2,'abc'}}
{{1,2,'abc'}}
{{}}