How to extract only floating numbers from a string
Ältere Kommentare anzeigen
Here is my string "21.5VgDC_0.05000V_VgAC_50M-150M30ms47GV1" How can I extract only the numbers 21.5, 0.05000, 50, 150 30 and 47 from the string. Thanks in advance
1 Kommentar
Jan
am 20 Jun. 2018
What's about '1e-5', '1D+004', '.1'?
Akzeptierte Antwort
Weitere Antworten (1)
Riadh Essaadali
am 21 Mai 2023
0 Stimmen
C = regexp(S,'[-+]?\d+\.?\d*','match');
Kategorien
Mehr zu Characters and Strings finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!