|
Contents | Previous | Next | Subchapters |
| Syntax |
pack(mat, ch) |
| See Also | clipstr , unpack , file2str |
row1, row2, ... , and rowN
are the rows of mat
with leading and trailing spaces removed,
the return value is the row vector
[row1, ch, " ", row2, ch, " ", ... , rowN]
The function pack
is useful when multiple character matrices need to be packed
into one large character matrix.
If the character ch is not present in the matrix mat,
the original information
can be recovered using the function unpack
.
mat = {"row 1", "row 2", "row 3"}
ch = ","
pack(mat, ch)
O-Matrix will respond
row 1, row 2, row 3