Search substring in character array

82 次查看(过去 30 天)
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 个评论
Erik Verdijk
Erik Verdijk 2018-5-8
Undefined function 'contains' for input arguments of type 'char'. I get this error
Ameer Hamza
Ameer Hamza 2018-5-8
编辑:Ameer Hamza 2018-5-8
contains() was introduced in R2016b. Which MATLAB version are you using?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Characters and Strings 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by