Borrar filtros
Borrar filtros

doing a 'strfind' with apostrophe in the string?

6 visualizaciones (últimos 30 días)
Michael
Michael el 26 de Mayo de 2011
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..

Respuesta aceptada

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

Más respuestas (0)

Categorías

Más información sobre Characters and Strings en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by