Contents Previous Next Subchapters

Matching Rows of A Character Matrix
Syntax whichrow(cmcr)
See Also string equality , findstr , strreplace , find2

Description
Returns the indices of the rows of the character matrix cm that are equal to the character row vector cr The return value is an integer column vector with the same number of rows as cm. If the number of rows is zero, none of the rows of cm are equal to cr. Trailing white space is ignored in this comparison.

Example
If you enter
     cm = {"line 1", "line 2"}
     cr = "line 2"
     whichrow(cm, cr)
O-Matrix will respond
     2