From: matlaberboy on
hello.
I have a CSV file. I don't know in advance what size it is (rows, cols) nor do I know the types associated with each col. The CSV contains mixed types.

url = 'http://www.bea.gov/national/nipaweb/csv/NIPATable.csv?TableName=6&FirstYear=1900&LastYear=2011&Freq=Qtr';

str = urlread(url);

The above link is one such example of such a file. As it updated in "real-time" we never know how many cols it has etc

I would like to get the whole contents of the CSV file loaded into a variable, probably with all the types changed to char. Hence I can search for the data I want (eg 'Gross domestic product') in that variable and then convert the asscoiated data to the correct type.

Matlab seems particuarly bad at doing this; there are so many methods (dlmread, textscan, urlwrite etc etc) and loads of very complex file exchange submissions.

Many Thanks