필터 지우기
필터 지우기

doing a 'strfind' with apostrophe in the string?

조회 수: 6 (최근 30일)
Michael
Michael 2011년 5월 26일
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..

채택된 답변

Sean de Wolski
Sean de Wolski 2011년 5월 26일
Use double apostrophes everywhere you have an apostrophe in your string, e.g:
A = findstr('''', '''REACQ''=''Y''')

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by