<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/239022</link>
    <title>MATLAB Central Newsreader - textread with endoflines</title>
    <description>Feed for thread: textread with endoflines</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Tue, 11 Nov 2008 01:10:34 -0500</pubDate>
      <title>textread with endoflines</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/239022#610201</link>
      <author>kates</author>
      <description>Dear Matlaber&lt;br&gt;
&lt;br&gt;
I have sensor data reading as follows:&lt;br&gt;
&lt;br&gt;
-SENSOR/DESCRIPTION&lt;br&gt;
*-------------------------&lt;br&gt;
&amp;nbsp;GOLD 08:01:00 108.5&lt;br&gt;
&amp;nbsp;GOLD 08:01:06 086.6&lt;br&gt;
&amp;nbsp;GOLD 08:01:12 085.0&lt;br&gt;
&amp;nbsp;GOLD 08:01:18 080.3&lt;br&gt;
&amp;nbsp;-/ Finish&lt;br&gt;
&amp;nbsp;+ (c) thank you&lt;br&gt;
&lt;br&gt;
I use the following syntax to read the data (in txt file):&lt;br&gt;
[sensor,hour,min,sec,param]=textread('sensor.txt','%4s %2d:%2d:%2d %f','delimiter',',','headerlines',2,'endofline','\n');&lt;br&gt;
&lt;br&gt;
Output: ??? Trouble reading literal string from file (row 1, field 5) ==&amp;gt; 1:00 108.5\n&lt;br&gt;
&lt;br&gt;
Do you have another way? Your time to response this small problem is appreciated.&lt;br&gt;
&lt;br&gt;
==kate</description>
    </item>
    <item>
      <pubDate>Tue, 11 Nov 2008 01:39:07 -0500</pubDate>
      <title>Re: textread with endoflines</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/239022#610204</link>
      <author>Richard Brown</author>
      <description>On Nov 11, 2:10=A0pm, kates &amp;lt;wa...@ukm.my&amp;gt; wrote:&lt;br&gt;
&amp;gt; Dear Matlaber&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I have sensor data reading as follows:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; -SENSOR/DESCRIPTION&lt;br&gt;
&amp;gt; *-------------------------&lt;br&gt;
&amp;gt; =A0GOLD 08:01:00 108.5&lt;br&gt;
&amp;gt; =A0GOLD 08:01:06 086.6&lt;br&gt;
&amp;gt; =A0GOLD 08:01:12 085.0&lt;br&gt;
&amp;gt; =A0GOLD 08:01:18 080.3&lt;br&gt;
&amp;gt; =A0-/ Finish&lt;br&gt;
&amp;gt; =A0+ (c) thank you&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I use the following syntax to read the data (in txt file):&lt;br&gt;
&amp;gt; [sensor,hour,min,sec,param]=3Dtextread('sensor.txt','%4s %2d:%2d:%2d %f',=&lt;br&gt;
'delimiter',',','headerlines',2,'endofline','\n');&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Output: ??? Trouble reading literal string from file (row 1, field 5) =3D=&lt;br&gt;
=3D&amp;gt; 1:00 108.5\n&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Do you have another way? Your time to response this small problem is appr=&lt;br&gt;
eciated.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; =3D=3Dkate&lt;br&gt;
&lt;br&gt;
Can I suggest you use textscan instead?&lt;br&gt;
fid =3D fopen('sensor.txt', 'r')&lt;br&gt;
C  =3Dtextscan(fid, '%s %d:%d:%d %f\n', 'headerlines', 2)&lt;br&gt;
fclose(fid)&lt;br&gt;
&lt;br&gt;
C is a cell array of vectors containing the various things ... e.g.&lt;br&gt;
C{1} would be sensor, C{2} hour, C{3} minute, etc.&lt;br&gt;
&lt;br&gt;
Hope that helps,&lt;br&gt;
&lt;br&gt;
Richard</description>
    </item>
    <item>
      <pubDate>Tue, 11 Nov 2008 03:16:32 -0500</pubDate>
      <title>Re: textread with endoflines</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/239022#610209</link>
      <author>kates</author>
      <description>Dear Richard&lt;br&gt;
&lt;br&gt;
Well done. Your idea very wonderful.&lt;br&gt;
&lt;br&gt;
See you next time. Thank you very much.&lt;br&gt;
&lt;br&gt;
==Kate</description>
    </item>
  </channel>
</rss>

