doing a 'strfind' with apostrophe in the string?
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
i have to do a strfind for the following phrase:
'REACQ'='N'
But when I go to do A = strfind(B, ''REACQ'='Y''), then there are clearly too many apostrophes in the code for MATLAB to know what to do..
0 commentaires
Réponse acceptée
Sean de Wolski
le 26 Mai 2011
Use double apostrophes everywhere you have an apostrophe in your string, e.g:
A = findstr('''', '''REACQ''=''Y''')
0 commentaires
Plus de réponses (0)
Voir également
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!