Opposite command of strfind?

3 vues (au cours des 30 derniers jours)
Ivan Mich
Ivan Mich le 7 Fév 2023
Modifié(e) : Jan le 7 Fév 2023
I have a general question. Does it exist the opposite command of strfind ?
  2 commentaires
Les Beckham
Les Beckham le 7 Fév 2023
What would this "opposite" command do? Please give an example showing sample inputs and output. Or, at least give a more complete explanation in words.
Ivan Mich
Ivan Mich le 7 Fév 2023
for example, strfind shows true result for words: "Milano" and "Milano".
I would like to have a command that could detect in an array the non same words...

Connectez-vous pour commenter.

Réponse acceptée

Jan
Jan le 7 Fév 2023
Modifié(e) : Jan le 7 Fév 2023
No, strfind does not replie true for any inputs. It replies the indices of found matchs.
Maybe you mean:
a = "Milano";
b = "Milano";
~isequal(a, b)
~strcmp(a, b)
isempty(strfind(a, b))
a ~= b
~(a == b)
~contains(a, b) % or (b, a) ?

Plus de réponses (0)

Catégories

En savoir plus sur Characters and Strings dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by