Path: news.mathworks.com!not-for-mail
From: "Wu Zhiyong" <wuzhiyong_163@163.com>
Newsgroups: comp.soft-sys.matlab
Subject: about textread
Date: Wed, 16 Apr 2008 13:11:02 +0000 (UTC)
Organization: Sun-Yatsen University
Lines: 35
Message-ID: <fu4tt6$rjq$1@fred.mathworks.com>
Reply-To: "Wu Zhiyong" <wuzhiyong_163@163.com>
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 1208351462 28282 172.30.248.37 (16 Apr 2008 13:11:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 16 Apr 2008 13:11:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1292814
Xref: news.mathworks.com comp.soft-sys.matlab:463304



I have a lot of data to read into matlab.They are printed 
in the textfile as followed:

airpressure staions  bias      MAE     RMSE    HR          
  200.0       44   1.82511   2.34681  2.78835  22
airpressure staions  bias      MAE     RMSE    HR
 300.0        38   1.55661   1.83753  2.44242  26
 &#8230;&#8230;
I need to ignore the characters. I did it in two ways.

 1.delete the characters manually.And write the code as 
followed:

[airpress sta bias mae rmse hr]=textread(filename,'%f %f %
f %f %f %f');

 2.add the symbol "%" in front of the characters manually:

%airpressure staions bias      MAE     RMSE    HR          
  200.0       44   1.82511   2.34681  2.78835  22
%airpressure staions bias       MAE     RMSE    HR
 300.0        38   1.55661   1.83753  2.44242  26
 &#8230;&#8230;

And write the code as followed:

[airpress sta bias mae rmse hr]=textread(filename,'%f %f %
f %f %f %f','commentstyle','matlab');

Both ways worked.But there are a large number of data 
files.And it costs too much time.  
  Do you have any other way to ignore the characters?
  Any suggestion is appreciated!
  Thank you!