ROWCAT Function

ROWCAT( matrix <, rows> <, columns> ) ;

The ROWCAT function concatenates rows of a character matrix without using blank compression. In particular, the function takes a character matrix or submatrix as its argument and creates a new matrix with one column whose elements are the concatenation of all row elements into a single string.

The arguments to the ROWCAT function are as follows:

matrix

is a character matrix or quoted literal.

rows

select the rows of matrix.

columns

select the columns of matrix.

If the input matrix has rows and columns, the result will have rows and 1 column. The element length of the result is times the element length of the argument. The optional rows and columns arguments can be used to select which rows and columns are concatenated.

For example, the following statements produce the matrix shown:

   b = {"ABC"  "D  "  "EF ",
        " GH"  " I "  " JK"};
   a = rowcat(b);
      A        2 rows      1 col     (character, size 9)

                        ABCD  EF
                         GH I  JK

Quotes (") are needed only if you want to embed blanks or special characters or to maintain uppercase and lowercase distinctions.

The syntax

ROWCAT( matrix, rows, columns ) ;

returns the same result as

ROWCAT( matrix[rows, columns] ) ;

The syntax

ROWCAT( matrix, rows ) ;

returns the same result as

ROWCAT( matrix[rows,] ) ;