I have a general question. Does it exist the opposite command of strfind ?

2 comentarios

Les Beckham
Les Beckham el 7 de Feb. de 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 el 7 de Feb. de 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...

Iniciar sesión para comentar.

 Respuesta aceptada

Jan
Jan el 7 de Feb. de 2023
Editada: Jan el 7 de Feb. de 2023

0 votos

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) ?

Más respuestas (0)

Categorías

Más información sobre Characters and Strings en Centro de ayuda y File Exchange.

Preguntada:

el 7 de Feb. de 2023

Editada:

Jan
el 7 de Feb. de 2023

Community Treasure Hunt

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

Start Hunting!

Translated by