matlab input如何使用 在matlab中findstr函数的作用?

在matlab中findstr函数的作用?1. Findstr(S1,S2)--查找较短字符串在较长字符串中出现的次数,并返回其位置。因此,无论哪个S1或S2是长字符串,位置是在前面还是后面都无关紧要

在matlab中findstr函数的作用?

1. Findstr(S1,S2)--查找较短字符串在较长字符串中出现的次数,并返回其位置。因此,无论哪个S1或S2是长字符串,位置是在前面还是后面都无关紧要。

示例:

s=“查找较短字符串的起始指示符。“

findstr(“the”)

ans=

6 30

findstr(“the”,s)

ans=

6 30!”