Search substring in character array

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

Réponses (1)

Ameer Hamza
Ameer Hamza le 8 Mai 2018
Modifié(e) : Ameer Hamza le 8 Mai 2018

0 votes

See strfind(). Or if position is not important then use contains().

2 commentaires

Erik Verdijk
Erik Verdijk le 8 Mai 2018
Undefined function 'contains' for input arguments of type 'char'. I get this error
Ameer Hamza
Ameer Hamza le 8 Mai 2018
Modifié(e) : Ameer Hamza le 8 Mai 2018
contains() was introduced in R2016b. Which MATLAB version are you using?

Connectez-vous pour commenter.

Catégories

Community Treasure Hunt

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

Start Hunting!

Translated by