[Top][All Lists]

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

Re: processing filenames returned by glob

From: Nicholas Jankowski
Subject: Re: processing filenames returned by glob
Date: Wed, 3 May 2017 12:39:50 -0400

On Wed, May 3, 2017 at 12:25 PM, Ether Jones <address@hidden> wrote:
> Hello.
> I used glob to return a cell array of filenames.
> Now I want Octave to load and process each of those filenames, one at a time, and generate a separate output file for each input file.
> Can someone please point me in the right direction?
> Or is there a better way to do this?

ok, so you have a list of filenames. Are these m-file scripts? data files you want to load and process in some way? .mat files that will bring in a bunch of variables when loaded? ...?

your filenames are strings, so there are a bunch of ways you could use a for loop appending that filename string to some other command like load, fopen, dlmread, etc.  See:

You can do a similar thing for file output once you have done whatever needs to be done. In you're loop you'll want to save data, where the save-as filename will somehow reflect the unique aspect of what was done, be it just appending the input filename, or something.

More specifics might produce more specific advice :)

Nick J.

reply via email to

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