Contents Previous Next Subchapters

Replacing a Row of a Character Matrix
Syntax reprow(mativalue)
See Also string equality , strclip , clipstr , strreplace , findstr

Returns a copy of the character matrix mat with row number i replaced by the character row vector value. If the integer scalar i is less that one or greater than the row dimension of mat, the return value is identical to mat. Otherwise the column dimension of the return value is the maximum of the column dimensions of mat and value and spaces are used to pad the necessary rows on the right.

If you enter
     mat   = {"row 1", "row 2", "row 3"}
     value = "line 2"
     reprow(mat, 2, value)
O-Matrix will respond
     row 1
     line 2
     row 3