I've got a fairly large and complex text file to read into MATLAB. The basic format looks something like this:
000723 4 123.12345 5 234.76543 ... 178.94444\n
The first column is always a six-digit date in yymmdd format, and the last column is always a double with "\n" on the end, and does not have an integer column preceding it. The "..." indicates where you would see more columns if they existed. Additional columns all come in pairs and follow the format of the preceding few, i.e.:
integer double
How might I go about doing this? It seems that most of the options to read data in require me to know the dimensions, but it is constantly changing with this dataset, and will always have variable columns in each row.
I'd love to get it into a simple matrix where the columns are:
date(from datenum) - double corresponding with integer 1 - double corresponding with integer 2 - ... - final double value
And if there was no occurrence of the integer in that row then it just gives a 0 or NaN in that matrix location.
importdatafunction may help - Luis Mendoimportdatato do this in the past. It at least gets the values into MATLAB in a sensible manner, but the columns don't align and I have to use a separate function I've written to get it all organized. I was hoping for a more direct "all-at-once" method than this. - A Blue Shoe