Search substring in character array

117 views (last 30 days)
Erik Verdijk
Erik Verdijk on 8 May 2018
Edited: Ameer Hamza on 8 May 2018
How can I find of a substring is present in a character array? The position is´t really important.

Answers (1)

Ameer Hamza
Ameer Hamza on 8 May 2018
Edited: Ameer Hamza on 8 May 2018
See strfind(). Or if position is not important then use contains().
  2 Comments
Ameer Hamza
Ameer Hamza on 8 May 2018
Edited: Ameer Hamza on 8 May 2018
contains() was introduced in R2016b. Which MATLAB version are you using?

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!