Extracting data from a text file into an array
Show older comments
I have a large text file, I know how to get to the line that I want to extract the data from. The line contains thousands of numbers in the form:
Data1 x1 y1 z1 x2 y2 z2
Data2 x3 y3 z3 x4 y4 z4
I want Data1 to be the name of a new nx3 array and every number that comes after Data1 until the next Data2 to be stored under Data1 and so forth...
Any help/hints would be appreciated. Thanks.
Answers (2)
Use one array, which could be numeric, cell, structure, etc.
Categories
Find more on Data Import and Export 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!