Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!backlog2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail
NNTP-Posting-Date: Mon, 18 May 2009 13:42:15 -0500
Date: Mon, 18 May 2009 11:42:15 -0700
From: Any one <?O75z!/9²s@WqP0SZo§XAs0NO2&D}CA³1_G.#`}>
Organization: Existential Ennui Awareness
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.5.0
MIME-Version: 1.0
Newsgroups: comp.soft-sys.matlab
Subject: N.B. -- Re: reading from a text file
References: <gurtb5$h3$1@fred.mathworks.com> <guru1n$gsh$1@fred.mathworks.com>
In-Reply-To: <guru1n$gsh$1@fred.mathworks.com>
X-No-Archive: yes
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <_Nidnc71fN-aMYzXnZ2dnUVZ_jSdnZ2d@earthlink.com>
Lines: 10
X-Usenet-Provider: http://www.giganews.com
NNTP-Posting-Host: 99.31.165.122
X-Trace: sv3-af96f8PHn7yWUcUdi3bVpYkNw9izoB2Ha+juL8Uk+N98IcTes0dnohs5WFNw8dLnM0uyg46vIy3y5be!JpMJKhesILdh5KMYKCDa/SeEwrtlmQFrvt40azpkREZuf47c0XTEzPUpJFy+CwXQTMrgTAafYPJH!4zD7SOivIUtjDVCSmfR0HEthC01ecA70oePsoVcTKFH0aOYw
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.39
X-Original-Bytes: 1652
Xref: news.mathworks.com comp.soft-sys.matlab:540799


us wrote on 18-May-09 08:15 :
[snip]
>      fnam='foo.txt';     % <- your file name
>      s=textread(fnam,'%n','headerlines',3,'whitespace','}');
[snip]

Help -> Search -> textread:

"Note   textread is not recommended. Use textscan to read data from a 
text file."   -- R2009a help page