From: Sunny on
Hi everyone,

I have written a matlab script to analyze data which is stored in .txt files. Thus far I am able to load only 1 file at a time using the importdata function.

Suppose I have a directory full of .txt files that need analysis. Is there a way to easily apply the .m file I've written to all the files?

Cheers,
S
From: Steven Lord on

"Sunny " <remove.this.sunnygurm(a)gmail.com> wrote in message
news:hur184$a8l$1(a)fred.mathworks.com...
> Hi everyone,
>
> I have written a matlab script to analyze data which is stored in .txt
> files. Thus far I am able to load only 1 file at a time using the
> importdata function.
> Suppose I have a directory full of .txt files that need analysis. Is there
> a way to easily apply the .m file I've written to all the files?

See Q4.12 in the newsgroup FAQ.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com