load txt as structure

2 views (last 30 days)
Fabrizio Marangio
Fabrizio Marangio on 10 Jun 2016
Answered: TastyPastry on 10 Jun 2016
If i have a .txt file of this type:
Name Jack Surname Black Date 10/06/2016
is there a way to load it in matlab as a structure with name, surname and date as fields and jack, black and 10/06/2016 as values? Thanks

Answers (1)

TastyPastry on 10 Jun 2016
Let's say your input line is stored in data:
in = strsplit(data);

Community Treasure Hunt

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

Start Hunting!