read *.txt file and manipulate datas
  Home FAQ Contact Sign in
comp.softsys.math.scilab only
 
Advanced search
POPULAR GROUPS

more...

comp.softsys.math.scilab Profile…
 Up
read *.txt file and manipulate datas         


Author: marcus.denk
Date: May 15, 2008 07:09

Hi Forum,

i want to read a *.txt file with this format:

for example " 10:12:08, 10.5, 80.77, 54.07
10:15:12, 11.2, 88.75, 53.14"

into Scilab and manipulate with the data.

Can somebody help me to create this file and explain how
the Syntax works ?

Would be fine
Thanks a lot
2 Comments
Re: read *.txt file and manipulate datas         


Author: ycollet
Date: May 15, 2008 08:23

Personnaly, I use this code:

fid = mopen('data.txt','r');

Data = [];
Index = 1;
while ~eof(fid)
Line = mgetl(fid,1);
Data(Index,:) = tokens(Line,' ');
Index = Index + 1;
end
mclose(fid);
no comments
Re: read *.txt file and manipulate datas         


Author: magreent
Date: Jun 16, 2008 03:11

I am trying to read a data file with 2 columns and have used the code
you posted below. I get an error message that says:

!--error 999

9
a separator must be formed by only one character.

Do you have any pointers on how I can get around this?

Thanks in advance.
Show full article (0.55Kb)
no comments

RELATED THREADS
SubjectArticles qty Group
Re: Help on writing Data CD- other 'junk' files appear with ~$microsoft.public.windowsxp.general ·