Skip to Main Content Skip to Search
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Doug’s Pick of the Week

February 16th, 2006

Apply a function to files

Thanks again to John D’Errico for giving Scott an extended break …

Following the advent of a more sophisticated cellfun in the newest matlab release, we now have FILEFUN, by Jerker Wagberg. Filefun allows you to apply any function to many files. Do you wish to simply collect the help for every function in a toolbox? Compute the average RGB values for each jpeg image in a directory tree? Perhaps you just wish to run a list of matlab scripts. Each of these tasks are now just a few keystrokes away.

I only wish I had not tested to see if ‘delete’ could be applied to all the files under matlabroot. Where did I put that backup?

One Response to “Apply a function to files”

  1. alexander valdenegro replied on :

    Dear Doug I have created a function with guide to transform a excel file to another format I can read all files in a directory with excel files Once and for all.

    thanks

Leave a Reply


Doug Hull is an Application Engineer at The MathWorks. A MATLAB user since 1994, he gets paid to live, eat, and breathe MATLAB! This blog is dedicated to promoting the File Exchange by highlighting files and original video content.



  • Tim Davis: Oh, I’m a bit dyslexic. The code has a variable “west” that should be called...
  • Tim Davis: The fix is to replace the max(diff(r)) line with: [ignore b] = sortrows ([diff(r') a(p(r(1:end-1)))']) b =...
  • Tim Davis: Matt, Good point, thanks for catching that. I missed that in the problem statement. It’s easy to...
  • Matt Fig: Tim, There is a problem in your second code. In the case when a zero block is the same size as a non-zero...
  • Moran: Hi Chris, I tried everything I could think of, and have sent several observations about this bug to support,...
  • odessit: Hello, I have compiled standalone application with deploytool. It would work fine, but the error is in...
  • Duane Hanselman: FYI… % strmatch replacements % strmatch is obsolete, strncmp and strcmp are built in % case...
  • Doug: Duane, I just looked, I did not see an m-lint warning against STRMATCH in 2008a. However, I seem to recall what...
  • hashem: Hi Doug, I built a GUI and write a help for it in “chm” (compiled HTML file) format, and I...
  • Tim Davis: I left out the comments in the code, above. Most of the functions should be familiar to most MATLAB users....

These postings are the author's and don't necessarily represent the opinions of The MathWorks.

Related Topics