Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!nx01.iad01.newshosting.com!newshosting.com!198.186.194.250.MISMATCH!news-out.readnews.com!news-xxxfer.readnews.com!postnews.google.com!x16g2000prn.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 16:51:56 -0700 (PDT)
Organization: http://groups.google.com
Lines: 20
Message-ID: <94268f3f-48b4-45af-b762-be0eda8c3364@x16g2000prn.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 1219103517 17683 127.0.0.1 (18 Aug 2008 23:51:57 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 18 Aug 2008 23:51:57 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: x16g2000prn.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:486133



On Jul 30, 11:07=A0pm, 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".  Can you
set commentStyle to skip both of those lines?
fid =3D fopen('data.txt');
Data =3D textscan(fid, '%f%f', 'commentStyle', ['Titles', 'Lables']);%
This doesn't work, but wondering what would???
fclose(fid);
Thanks