How do I extract numbers from a textscan?
Show older comments
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?
Accepted Answer
More Answers (0)
Categories
Find more on Large Files and Big Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!