help-octave
[Top][All Lists]
Advanced

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

Re: variable for filename in fopen


From: Carlo de Falco
Subject: Re: variable for filename in fopen
Date: Tue, 19 Jan 2010 08:58:46 +0100

2010/1/19 Blitz <address@hidden>:
>
> Yeah.  Sorry guys.  I am using an older version.  I thought fink would have
> installed the latests, but I guess not.  I'm on 3.0.5
>
> I will try updating and use the dir function.  thanks!
>

actually, maybe 'glob' is more appropriate than 'dir' in this case:

list =  glob("*.txt");
for i = 1:length(list),
   reading = list{i};
   fid = fopen(reading, 'r') % open the file
   % do stuff
end;

HTH,
c.



reply via email to

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