Info

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

How can I extract the numbers from this string

1 次查看(过去 30 天)
Anyone knows that is there any easy way to extract the numbers from this string?
the string is "JY CME JAPANESE YEN FUTURES SEP13 10157 10315 10149 ---- 10301 +162 162704 10139 77441 171982 DEC13 10"
Many many thanks,

回答(1 个)

Andrei Bobrov
Andrei Bobrov 2013-8-28
str = 'JY CME JAPANESE YEN FUTURES SEP13 10157 10315 10149 ---- 10301 +162 162704 10139 77441 171982 DEC13 10';
ns = str2double(regexp(str,'\d*','match'));

此问题已关闭。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by