Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!news.glorb.com!postnews.google.com!r15g2000prh.googlegroups.com!not-for-mail
From: beginner1.mat@hotmail.com
Newsgroups: comp.soft-sys.matlab
Subject: Re: how to read a file skipping all the text lines
Date: Mon, 18 Aug 2008 19:03:29 -0700 (PDT)
Organization: http://groups.google.com
Lines: 39
Message-ID: <7f58cd55-3107-4b4e-8b5b-bee2840f17d5@r15g2000prh.googlegroups.com>
References: <g6qv69$4cu$1@fred.mathworks.com> <g6rkqj$611$1@canopus.cc.umanitoba.ca> 
NNTP-Posting-Host: 75.83.42.7
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1219111409 12564 127.0.0.1 (19 Aug 2008 02:03:29 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 19 Aug 2008 02:03:29 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: r15g2000prh.googlegroups.com; posting-host=75.83.42.7; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) 
Xref: news.mathworks.com comp.soft-sys.matlab:486143



On Aug 18, 5:17=A0pm, "Paul " <p...@ceri.memphis.edu> wrote:
> beginner1....@hotmail.com wrote in message
>
> <94268f3f-48b4-45af-b762-be0eda8c3...@x16g2000prn.googlegroups.com>...
>
>
>
> > On Jul 30, 11:07=3DA0pm, rober...@ibd.nrc-cnrc.gc.ca (Walter
> Roberson)
> > wrote:
> > > In article <g6qv69$4c...@fred.mathworks.com>,
>
> > > Kushagra Mittal <kmit...@ymail.com> wrote:
> > > >I want to read a ASCII file (given below). I only want to
> > > >read the numerical data in the form of a matrix andskipall
> > > >other textlinesand the last character in the file which
> is ')'
> > > >Please suggest me how to do it?
>
> > > Usetextscan(), telling it that ( and ) are comment
> characters.
>
> > Is there a way to have more than one comment character?
> Say, one of
> > the lines starts with "Titles" and the other with
> "Lables". =A0Can you
> > set commentStyle to skip both of those lines?
> > fid =3D3D fopen('data.txt');
> > Data =3D3D textscan(fid, '%f%f', 'commentStyle', ['Titles',
> 'Lables']);%
> > This doesn't work, but wondering what would???
> > fclose(fid);
> > Thanks
>
> Try putting Titles and Lables in a cell array and see if
> that works.

It didn't...seems like that is used for start and stop when put into a
cell array.