Effacer les filtres
Effacer les filtres

Find the exact match of a string from a cell array.

1 vue (au cours des 30 derniers jours)
sc1991
sc1991 le 11 Déc 2018
Réponse apportée : sc1991 le 11 Déc 2018
Hi! this looks to be easy but somehow its not working for me. So here is the problem statement, I have a cell array with all the parameters name
Parameter ={name_1000ms
name2_1000ms
name3_1000msCD
name4_200ms};
now i just want to extarct name_1000ms and name2_1000ms basically when i do strcmp for 1000ms i just want it to pull all the parameter name that has exact match of 1000ms and not 1000msCD.
  1 commentaire
sc1991
sc1991 le 11 Déc 2018
Hello! I just wanted to update I found a quick solution to the above problem there is a function endsWith that works really well in my case. But i am still wondering if there is any other way that we can do. For now endsWith seems to have worked perfectly for me.
Please feel free to post your responses as well.Thanks

Connectez-vous pour commenter.

Réponse acceptée

sc1991
sc1991 le 11 Déc 2018
Hello! I just wanted to update I found a quick solution to the above problem there is a function endsWith that works really well in my case. But i am still wondering if there is any other way that we can do. For now endsWith seems to have worked perfectly for me.
Please feel free to post your responses as well.Thanks

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB 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