Search substring in character array

How can I find of a substring is present in a character array? The position is´t really important.

回答(1 个)

Ameer Hamza
Ameer Hamza 2018-5-8
编辑:Ameer Hamza 2018-5-8
See strfind(). Or if position is not important then use contains().

2 个评论

Undefined function 'contains' for input arguments of type 'char'. I get this error
contains() was introduced in R2016b. Which MATLAB version are you using?

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Cell Arrays 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by