Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: read nonuniform text
Date: Tue, 28 Oct 2008 14:58:02 +0000 (UTC)
Organization: Pierburg GmbH
Lines: 7
Message-ID: <ge799q$ss$1@fred.mathworks.com>
References: <ge6nld$1bn$1@fred.mathworks.com>
Reply-To: <HIDDEN>
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 1225205882 924 172.30.248.37 (28 Oct 2008 14:58:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 28 Oct 2008 14:58:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 872224
Xref: news.mathworks.com comp.soft-sys.matlab:497646


A suggestion with txt2mat from the file exchange:
.
A = txt2mat('file.txt','ReplaceExpr',{{'*','0'},{'PG','1 '}});
.
The values in the first column of A, 0 or 1, will indicate whether the numbers were taken from a line starting with '*' or 'PG', respectively. Rows will be padded with NaNs.
Hth
Andres