Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to remove unwanted text from a .txt file?
Date: Fri, 26 Sep 2008 03:11:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 23
Message-ID: <gbhjs6$nr8$1@fred.mathworks.com>
References: <gbbqun$qo5$1@fred.mathworks.com> <ryeCk.36464$QF5.28064@newsfe08.iad> <gbbubd$2n7$1@fred.mathworks.com> <VGfCk.562$Cl1.66@newsfe01.iad> <gbc1vn$8k6$1@fred.mathworks.com> <gbc2m6$de7$1@fred.mathworks.com> <gbc4i6$qf5$1@fred.mathworks.com> <gbcjal$h84$1@fred.mathworks.com> <qukCk.14892$Il.5652@newsfe09.iad> <gbcn4h$ej1$1@fred.mathworks.com> <gbcnr1$kbc$1@fred.mathworks.com> <5JlCk.9617$tp1.8665@newsfe06.iad> <gbhh9l$sv9$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1222398662 24424 172.30.248.35 (26 Sep 2008 03:11:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 26 Sep 2008 03:11:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1248302
Xref: news.mathworks.com comp.soft-sys.matlab:492142


I seem to have found a reasonable solution to my problem but however I can&#8217;t get it to work, Will appreciate reviewing my code below please.
Through the following code I&#8217;m hoping to get the textscan to resume.

fid = fopen('test.txt');
[C, position] = textscan(fid(position+1:end),'%f %f %f %f %f %f ','delimiter',',');
% % % % % fid = fclose(fid);
C = [C{:}];

Sample code:

10,13,40,1214.25,5,22
20,13,40,1214.25,84,22
30,13,40,1214.25,30,22
40,13,40,1214.25,2,22
j
50,13,42,1214.00,1,11
k
60,13,43,1214.00,1,11
20,13,43,1214.00,1,11
20,15,59,1214.50,1,23
20,15,59,1214.50,1,23
20,15,59,1214.50,1,23