help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Importing data problems


From: Richardson, Anthony
Subject: RE: Importing data problems
Date: Tue, 29 Sep 2009 11:19:44 -0500

Here's my attempt:

fid = fopen("temp.dat","r");
%Read header
h = fgetl(fid);
index = 1;
t1 = [];
t2 = [];
time = ["        "];
while(1)
  [t n1 n2 n3 n4 count] = fscanf(fid,"%s %d,%d %d,%d" ,"C");
  time(index,:) = t;
  t1(index) = [n1+n2/10];
  t2(index) = [n3+n4/10];
  index++;
  if (feof(fid)) break; endif
endwhile
fclose(fid);


> -----Original Message-----
> From: s4y [mailto:address@hidden
> Sent: Tuesday, September 29, 2009 4:33 AM
> To: address@hidden
> Subject: Importing data problems
> 
> 
> Hello, i can't load my file into octave.
> It lokks like this:
> 
> time temperature1 temperature2
> 16:15:07 15,3 32,4
> 16:15:17 15,6 45,4
> 16:15:27 17,5 56,6
> 
> First of all there is a problem with the commata. Is it possible to
> load it
> without changing the original file. Further the time value including "
> : "
> creates an error. And i dont know how to erase the text line in the
> imported
> file.
> Thanks in advance.
> Sebastian
> 
> --
> View this message in context: http://www.nabble.com/Importing-data-
> problems-tp25659793p25659793.html
> Sent from the Octave - General mailing list archive at Nabble.com.
> 
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave



reply via email to

[Prev in Thread] Current Thread [Next in Thread]