Path: news.mathworks.com!not-for-mail
From: "Matthew " <men5mjr@leeds.ac.uk>
Newsgroups: comp.soft-sys.matlab
Subject: Re: problems using textread
Date: Wed, 19 Nov 2008 15:52:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 24
Message-ID: <gg1cn2$dri$1@fred.mathworks.com>
References: <gfv9m2$968$1@fred.mathworks.com> <gfva6u$grj$1@fred.mathworks.com> <gfvco4$ke0$1@fred.mathworks.com>
Reply-To: "Matthew " <men5mjr@leeds.ac.uk>
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 1227109922 14194 172.30.248.37 (19 Nov 2008 15:52:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 19 Nov 2008 15:52:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1606798
Xref: news.mathworks.com comp.soft-sys.matlab:501751


Luca,

thank you, it was a comn=bination of the headerlines and the %f's i was using i think??? but it is working fine now so thanks a lot!!

Matthew


"Luca Zanotti Fragonara" <Luca_Zanotti@libero.it> wrote in message <gfvco4$ke0$1@fred.mathworks.com>...
> Sorry, I've posted 2 times, and this is the third. But I've posted a wrong code. I've written textread, while I was thinking at textscan. So the correct code is:
> fin=fopen('filename','rt')
> A=textscan(fin,'%f %f %f %f %f %f %f','endofline','\n','Headerlines',number);
> fclose(fin);
> CD=A{3}(:,1);
> 
> "Luca Zanotti Fragonara" <Luca_Zanotti@libero.it> wrote in message <gfva6u$grj$1@fred.mathworks.com>...
> > fin=fopen('filename','rt')
> > A=textread(fin,'%f %f %f %f %f %f %f','endofline','\n','Headerlines',number);
> > fclose(fin);
> > where number is the number of the row where you want to start to read the file.
> > in A{3} you have your Cd, so
> > CD=A{3}(:,1);
> > 
>