How to extract only floating numbers from a string
显示 更早的评论
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 个)
Riadh Essaadali
2023-5-21
0 个投票
C = regexp(S,'[-+]?\d+\.?\d*','match');
类别
在 帮助中心 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!