Search substring in character array

66 ビュー (過去 30 日間)
Erik Verdijk
Erik Verdijk 2018 年 5 月 8 日
編集済み: Ameer Hamza 2018 年 5 月 8 日
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 Center および File ExchangeCharacters and Strings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by