Contents Previous Next Subchapters

Unpacks A Character Matrix From a Row Vector
Syntax unpack(vecch)
See Also pack

Description
Returns a character matrix corresponding to the character row vector vec. Each row of the return value is equal to the characters (not including leading white space) between occurrences of the character ch, in the vector vec. To be specific, suppose the vector vec is equal to
     [Row1, chRow2, ch, ... , RowN]
and there are no other occurrences of the character ch in the vector vec. The return value has N rows and is equal to
     row1
     row2
     ...
     rowN
where for each j, rowj is equal to Rowj with leading spaces removed.

In the special case where vec only contains spaces and the ch character, the return value has N rows and one column and its elements are all spaces.

Example
If you enter
     vec = "row 1, row 2, row 3"
     ch  = ","
     unpack(vec, ch)
O-Matrix will respond
     row 1
     row 2
     row 3