Path: news.mathworks.com!not-for-mail
From: "Leblead Sweid" <bhannine@live.com>
Newsgroups: comp.soft-sys.matlab
Subject: can not read float numbers from a txt file.
Date: Thu, 13 Aug 2009 09:25:17 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 20
Message-ID: <h60m5t$shr$1@fred.mathworks.com>
Reply-To: "Leblead Sweid" <bhannine@live.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 1250155517 29243 172.30.248.37 (13 Aug 2009 09:25:17 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 13 Aug 2009 09:25:17 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1933270
Xref: news.mathworks.com comp.soft-sys.matlab:562933


Hi everybody,

i am trying to read float numbers from a text file, but it worked only if i assume the float numbers as string .To be more clear, i have tried that:

data=textscan(fid,'%*s%s%s%s%s%s%s%s%s%s%s%s%s%s','delimiter', ';')

to read that file 

00:00:19,968;8,02;8,44;8,30;7,79;8,19;7,96;9,80;9,44;15,42;16,35;13,40;13,19;8,16;
00:00:19,972;8,00;8,49;8,35;7,86;8,24;7,85;9,72;9,33;15,01;16,04;13,41;13,43;8,05;
00:00:19,976;7,91;8,40;8,18;7,89;8,13;7,96;9,78;9,49;15,14;16,36;13,41;13,31;8,02;
00:00:19,980;7,95;8,45;8,29;7,84;8,19;8,02;9,92;9,53;15,00;16,49;13,28;13,34;8,26;

so when i used:

data=textscan(fid,'%n%n%n%n%n%n%n%n%n%n%n%n%n%n','delimiter', ';')

i got only two arrays instead of 14 arrays and in the two arrays there are only numbers with nothing after the comma.

thanks .