Value associate to a parameter in a text
2 次查看(过去 30 天)
显示 更早的评论
采纳的回答
Paolo
2018-7-9
编辑:Paolo
2018-7-9
data = fileread('mytextfile.txt');
val = regexp(data,'(?<=\s)(-?\d*\.?\d*)(?=\s|$)','match');
7 个评论
Paolo
2018-7-9
That's right, you will need to use the greedy * quantifier rather than the + quantifier. Since you need to match those values too, use:
(?<=KUTY01\s)-?\d*\.?\d*
I'll update my answer.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!