Path: news.mathworks.com!newsfeed-00.mathworks.com!nntp.TheWorld.com!support1.mathforum.org!not-for-mail
From: kates <wayan@ukm.my>
Newsgroups: comp.soft-sys.matlab
Subject: textread with endoflines
Date: Mon, 10 Nov 2008 20:10:34 EST
Organization: The Math Forum
Lines: 21
Message-ID: <6449394.1226365864859.JavaMail.jakarta@nitrogen.mathforum.org>
NNTP-Posting-Host: nitrogen.mathforum.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: support1.mathforum.org 1226365864 16756 144.118.30.135 (11 Nov 2008 01:11:04 GMT)
X-Complaints-To: news@news.mathforum.org
NNTP-Posting-Date: Tue, 11 Nov 2008 01:11:04 +0000 (UTC)
Xref: news.mathworks.com comp.soft-sys.matlab:500125


Dear Matlaber

I have sensor data reading as follows:

-SENSOR/DESCRIPTION
*-------------------------
 GOLD 08:01:00 108.5
 GOLD 08:01:06 086.6
 GOLD 08:01:12 085.0
 GOLD 08:01:18 080.3
 -/ Finish
 + (c) thank you

I use the following syntax to read the data (in txt file):
[sensor,hour,min,sec,param]=textread('sensor.txt','%4s %2d:%2d:%2d %f','delimiter',',','headerlines',2,'endofline','\n');

Output: ??? Trouble reading literal string from file (row 1, field 5) ==> 1:00 108.5\n

Do you have another way? Your time to response this small problem is appreciated.

==kate