Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re:
Date: Fri, 16 May 2008 18:49:02 +0000 (UTC)
Organization: Pierburg GmbH
Lines: 27
Message-ID: <g0kkuu$47v$1@fred.mathworks.com>
References: <g0kgia$nlu$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1210963742 4351 172.30.248.38 (16 May 2008 18:49:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 16 May 2008 18:49:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 872224
Xref: news.mathworks.com comp.soft-sys.matlab:468922



"Hosein " <Kalaeimh@yahoo.com> wrote in message
<g0kgia$nlu$1@fred.mathworks.com>...
> I have a text file as follows:
> 
> CC
> CC
> *----
>     2 3
> 34 6
> CC
> *---
> 2.2 3.3 4.4
> 
> [...]
> if anybody can write some lines of a code to read even above
> example, I will appreciate.
> (I already read the example regarding to 'textread' and
> 'textscan'. but I did not find anything clear.)

A = txt2mat('C:\myfile.txt',0,-3,'BadLineString',{'*','C'});

is a possible one-liner solution. txt2mat can be found on
the file exchange (see its help for details).

Hth,
regards
Andres