Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

How can I extract the numbers from this string

1 Ansicht (letzte 30 Tage)
Zheng
Zheng am 28 Aug. 2013
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
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,

Antworten (1)

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

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by