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?
评论
要发表评论,请点击 此处 登录到您的 MathWorks 帐户或创建一个新帐户。