How to extract only floating numbers from a string
Afficher commentaires plus anciens
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 commentaire
Jan
le 20 Juin 2018
What's about '1e-5', '1D+004', '.1'?
Réponse acceptée
Plus de réponses (1)
Riadh Essaadali
le 21 Mai 2023
0 votes
C = regexp(S,'[-+]?\d+\.?\d*','match');
Catégories
En savoir plus sur Characters and Strings dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!