Contents Previous Next Subchapters

Determining Indices Where A Character Is Between Limits
Syntax i = find(textlowerupper)
[ij] = find(textlowerupper)
See Also strreplace , find text , string equality and string ordering

Returns the indices in the character matrix text where there are occurrences of the characters that fall between the limits specified by the row vectors lower and upper, which must be of equal length. If both i and j are present, they are integer column vectors containing the row and column indices in text. Otherwise i is a two column integer matrix with the first column corresponding to row indices and the second to column indices. Trailing blanks in lower and upper are not ignored and must be matched.

If you enter
     list = {"TEST.A9", "TEST.B8", "TEST.C7", "TEST.D3"}
     find(list, "A1", "B5")
O-Matrix will respond
     [ 1 , 6 ]
     [ 2 , 6 ]
     [ 4 , 7 ]
because the sixth column of the first row ("A") and the sixth column of the second row ("B") of list are within the boundaries of the first elements of upper and lower, and the seventh element of the fourth row ("3") is within the boundaries of the second elements of upper and lower.