Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!news.glorb.com!news.cse.ohio-state.edu!usenet01.sei.cmu.edu!elk.ncren.net!newsflash.concordia.ca!canopus.cc.umanitoba.ca!not-for-mail
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Newsgroups: comp.soft-sys.matlab
Subject: Re: how to read a file skipping all the text lines
Date: Thu, 31 Jul 2008 06:07:15 +0000 (UTC)
Organization: National Research Council Canada - Conseil national de rechereches Canada
Lines: 12
Message-ID: <g6rkqj$611$1@canopus.cc.umanitoba.ca>
References: <g6qv69$4cu$1@fred.mathworks.com>
NNTP-Posting-Host: origin.ibd.nrc.ca
X-Trace: canopus.cc.umanitoba.ca 1217484435 6177 192.70.172.160 (31 Jul 2008 06:07:15 GMT)
X-Complaints-To: abuse@cc.umanitoba.ca
NNTP-Posting-Date: Thu, 31 Jul 2008 06:07:15 +0000 (UTC)
Originator: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Xref: news.mathworks.com comp.soft-sys.matlab:482842



In article <g6qv69$4cu$1@fred.mathworks.com>,
Kushagra Mittal <kmittal@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 and skip all
>other text lines and the last character in the file which is ')'

>Please suggest me how to do it? 

Use textscan(), telling it that ( and ) are comment characters.
-- 
  "You may comand nature to the extent only in which you are willing to
  obey her."                                  -- Walter Russell