strcmp gives a 0 while it should be a 1

18 vues (au cours des 30 derniers jours)
Lieke van Boxtel
Lieke van Boxtel le 2 Avr 2024 à 8:00
Commenté : Lieke van Boxtel le 2 Avr 2024 à 8:21
I am comparing names in 2 tables, to get the corresponding names and use that information. For this I am using strcmp, but for some of them they give back a 0 while they look the same to me, while for others it works fine. An example can be seen below, where it does not work. A week ago, this script was working perfectly fine. Where could I look to see what is different about these two, that it gives back a 0, so I can change what I need to.

Réponse acceptée

Bruno Luong
Bruno Luong le 2 Avr 2024 à 8:06
Look more carefully: There is a 'c' before '49' in A but not in B
  1 commentaire
Lieke van Boxtel
Lieke van Boxtel le 2 Avr 2024 à 8:21
Thank you, I knew there was something I was not seeing.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

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

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by