I have a text file and would like to import it into MATLAB and make it a list:
Person1
name = steven
grade = 11
age= 17
Person2
name = mike
grade = 9
age= 15
Person3
name = taylor
grade = 11
age= 17
There are a few hundred entries like these above. Each are separated by a blank line. I was thinking I could scan the text and make the information between each blank line into an item in the list. I also would like to be able to look up each person by name once I have a list like the one below.
I want something like:
x = [Person1 Person2 Person3
name = steven name = mike name = taylor
grade = 11 grade = 9 grade = 11
age = 17 age = 15 age = 17]
This seems very straight forward but I have been having trouble with this so far. I may be overlooking something. Anyone have any ideas or advice?