Info

This question is closed. Reopen it to edit or answer.

How to read a text file with header and data, whose structure keeps changing?

1 view (last 30 days)
I have a .txt file which is as follows:
Header: Filename 0 Conditions R_FBKRN_target0 Time 3:01:27 PM Date 10/26/10 Feedback_during_trial FB Feedback_after_trial KR
Names:
sec CursorX CursorY FingerX
DATA:
3 23 33 12
2 11 11 23
I need to read the entire file, such that the data from Header: to Names : is in %s %s format, and data after Names: , the respective column headers with their values. Also, while reading, I need to ignore the terms Header: , Name: and DATA

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!