Extract number from string

12 Ansichten (letzte 30 Tage)
Yen Tien Yap
Yen Tien Yap am 10 Mai 2022
Beantwortet: dpb am 10 Mai 2022
I have a coloumn of strings and I want to extract the numbers after the equal signs in an array. May I know how can I do that? Thank you.
"POINT_0_0=294.397"
"POINT_0_1=294.560"
"POINT_0_2=294.459"
"POINT_0_3=294.294"
"POINT_0_4=293.635"

Akzeptierte Antwort

dpb
dpb am 10 Mai 2022
v=str2double(extractAfter(X,'='));
is one way. For more difficult cases look at the new(ish) @doc:pattern function

Weitere Antworten (0)

Kategorien

Mehr zu Characters and Strings finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by