Check a sequence inside another sequence in matlab -
i have sequences:
{b < < c < d < e}, {a < b < d < e < c} how check b < e in above strings or not?
thanks!
you can use regexp:
inputs = {'{b < < c < d < e}', '{a < b < d < e < c}' }; res = regexp( inputs, 'b.*<.*e' ) results with
res = [2] [6] that res{ii} first location of b in input string ii. if res{ii} empty means b < e not in ii-th string.
Comments
Post a Comment