Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: about textread
Date: Thu, 17 Apr 2008 20:05:06 +0000 (UTC)
Organization: Pierburg GmbH
Lines: 23
Message-ID: <fu8ahh$c8m$1@fred.mathworks.com>
References: <fu4tt6$rjq$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1208462706 12566 172.30.248.35 (17 Apr 2008 20:05:06 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 17 Apr 2008 20:05:06 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 872224
Xref: news.mathworks.com comp.soft-sys.matlab:463713



"Wu Zhiyong" <wuzhiyong_163@163.com> wrote in message
<fu4tt6$rjq$1@fred.mathworks.com>...
> 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. [...]

You may try txt2mat from the file exchange with
A = txt2mat('Filename',0,6,'BadLineString','air');
This should result in the matrix 
A = [200.0  44   1.82511   2.34681  2.78835  22
     300.0  38   1.55661   1.83753  2.44242  26
     ...]
It would be interesting to know for me if this works
reasonably fast.
Regards
Andres