Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: read the first line from a csv file of unknown length
Date: Fri, 16 Nov 2007 18:16:09 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 31
Message-ID: <fhkmp9$fpe$1@fred.mathworks.com>
References: <fhkgvh$oor$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1195236969 16174 172.30.248.37 (16 Nov 2007 18:16:09 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 16 Nov 2007 18:16:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869596
Xref: news.mathworks.com comp.soft-sys.matlab:437973



"Philip Gladwin" <philip.gladwin@citi.com> wrote in 
message <fhkgvh$oor$1@fred.mathworks.com>...
> Hello,
> Does anybody know how to solve this problem?
> 
> I would like to read the column headings, as strings, 
> from the first row of a comma-separated file into
> an string array.
> 
> The tricky part is I would like to do this without
> specifying the number of columns in the file, as
> the column headings will change from file to file.
> 
> Can anybody help?
> 
> Thank you.
> 
> Phil,
> 
> 

Phil, you can take a look at autodataread.m in the FEX. I 
parse the header as you describe. 

hth,
Scott
> 
> 
> 
>