Info

此问题已关闭。 请重新打开它进行编辑或回答。

Extracting numbers from Text document

1 次查看(过去 30 天)
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 个评论
TAB
TAB 2012-4-30
How data is formated in your text document.
Is it contains only a5229si ?

回答(1 个)

Andrei Bobrov
Andrei Bobrov 2012-4-30
regexprep(str,str,'5')
  1 个评论
Sivakumaran Chandrasekaran
I get different answer even if i use the same command which you gave. instead of '5' i mentioned 'z'...

此问题已关闭。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by