doing a 'strfind' with apostrophe in the string?
8 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Sean de Wolski
2011-5-26
Use double apostrophes everywhere you have an apostrophe in your string, e.g:
A = findstr('''', '''REACQ''=''Y''')
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!