How do I extract numbers from a textscan?
显示 更早的评论
I need to read a file with lines of data in the following format:
15:52:35.375,0.000,0.606,-0.820,-1,31.400,0.000,0
I am using textscan as follows to parse the data:
C = textscan(A, '%d:%d:%f,%f,%f,%f,%d,%f,%f,%d');
My results look like:
[15] [52] [35.375] [0.000] [0.606] [-0.820] [-1] [31.400] [0.000] [0]
I'm interpreting this output to mean that C is a vector of vectors. Is that correct? How do I convert it to a vector of numbers?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Large Files and Big Data 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!