我试图在向量中找到一个字符串.对于Eg:查询="ab"in vector = ["ab","cd","abc","cab"]
问题是:当我使用函数strfind(vector,query)时,它给出了所有带有字符串"ab"的索引.在这种情况下,"ab"包括"abc"和"cab".但我只想要"ab"的索引而不是其他索引.Octave有没有特定的功能?
octave string-matching
octave ×1
string-matching ×1