Extracting numbers from Text document

Hi, I have a text document which has the values a5229si. I should get the output as 5. Can anyone reply me the code.
Regards.,
Siva

2 comentarios

TAB
TAB el 30 de Abr. de 2012
How data is formated in your text document.
Is it contains only a5229si ?
Sivakumaran Chandrasekaran
Sivakumaran Chandrasekaran el 30 de Abr. de 2012
Yes.

Respuestas (1)

Andrei Bobrov
Andrei Bobrov el 30 de Abr. de 2012
regexprep(str,str,'5')

1 comentario

Sivakumaran Chandrasekaran
Sivakumaran Chandrasekaran el 30 de Abr. de 2012
I get different answer even if i use the same command which you gave. instead of '5' i mentioned 'z'...

La pregunta está cerrada.

Etiquetas

Preguntada:

el 30 de Abr. de 2012

Cerrada:

el 20 de Ag. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by