<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Processing a Set of Files</title>
	<atom:link href="http://blogs.mathworks.com/loren/2006/08/02/processing-a-set-of-files/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/loren/2006/08/02/processing-a-set-of-files/</link>
	<description>Loren Shure works on design of the MATLAB language at MathWorks. She writes here about once a week on MATLAB programming and related topics.</description>
	<lastBuildDate>Mon, 13 Feb 2012 13:24:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: R.Topham</title>
		<link>http://blogs.mathworks.com/loren/2006/08/02/processing-a-set-of-files/#comment-31398</link>
		<dc:creator>R.Topham</dc:creator>
		<pubDate>Wed, 02 Jun 2010 17:49:56 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=48#comment-31398</guid>
		<description>I finally found out... More or less this is the code that does the job I want =)

&lt;pre&gt;
hdf_files = dir(&#039;MOD08_M3.A*.hdf&#039;);
for k = 1:length(hdf_files)
    filename = hdf_files(k).name;
    data = hdfread(filename, &#039;LST_Day_CMG&#039;);
end
&lt;/pre&gt;

Thank you very much for your help!</description>
		<content:encoded><![CDATA[<p>I finally found out&#8230; More or less this is the code that does the job I want =)</p>
<pre>
hdf_files = dir('MOD08_M3.A*.hdf');
for k = 1:length(hdf_files)
    filename = hdf_files(k).name;
    data = hdfread(filename, 'LST_Day_CMG');
end
</pre>
<p>Thank you very much for your help!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2006/08/02/processing-a-set-of-files/#comment-31397</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Wed, 02 Jun 2010 11:05:37 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=48#comment-31397</guid>
		<description>Ricardo-

You have to somehow gather the list of names.  Perhaps in your case, you get the names like this:

names = dir(&#039;MOD08_M3.A*.hdf&#039;);

Once you do, you can loop over the names similar to the example above.

--Loren</description>
		<content:encoded><![CDATA[<p>Ricardo-</p>
<p>You have to somehow gather the list of names.  Perhaps in your case, you get the names like this:</p>
<p>names = dir(&#8216;MOD08_M3.A*.hdf&#8217;);</p>
<p>Once you do, you can loop over the names similar to the example above.</p>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: R.Topham</title>
		<link>http://blogs.mathworks.com/loren/2006/08/02/processing-a-set-of-files/#comment-31396</link>
		<dc:creator>R.Topham</dc:creator>
		<pubDate>Wed, 02 Jun 2010 10:41:53 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=48#comment-31396</guid>
		<description>I want to open a list of files with a common name scheme of this type: &quot;filestart + changing characters&quot;.

Example:

MOD08_M3.A2000032.005.2006255182125.hdf
MOD08_M3.A2000061.005.2008271011815.hdf
MOD08_M3.A2000092.005.2006265004700.hdf
MOD08_M3.A2000122.005.2006256101527.hdf

I&#039;m having problems with filling in the changing characters of the filenames... =(

Thanks for your help.</description>
		<content:encoded><![CDATA[<p>I want to open a list of files with a common name scheme of this type: &#8220;filestart + changing characters&#8221;.</p>
<p>Example:</p>
<p>MOD08_M3.A2000032.005.2006255182125.hdf<br />
MOD08_M3.A2000061.005.2008271011815.hdf<br />
MOD08_M3.A2000092.005.2006265004700.hdf<br />
MOD08_M3.A2000122.005.2006256101527.hdf</p>
<p>I&#8217;m having problems with filling in the changing characters of the filenames&#8230; =(</p>
<p>Thanks for your help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2006/08/02/processing-a-set-of-files/#comment-24317</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Fri, 04 Jan 2008 12:09:44 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=48#comment-24317</guid>
		<description>Ibrahim-

Use the functional form for writing your report and build up the filename, something like this:

&lt;pre class=&quot;code&quot;&gt;
for n = 1:numFiles
  fn = [&#039;report&#039;, int2str(n), &#039;.xls&#039;);
  % now use this filename, e.g.,
  xlswrite(fn, ...)
end

&lt;/pre&gt;

--Loren</description>
		<content:encoded><![CDATA[<p>Ibrahim-</p>
<p>Use the functional form for writing your report and build up the filename, something like this:</p>
<pre class="code">
for n = 1:numFiles
  fn = ['report', int2str(n), '.xls');
  % now use this filename, e.g.,
  xlswrite(fn, ...)
end
</pre>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ibrahim</title>
		<link>http://blogs.mathworks.com/loren/2006/08/02/processing-a-set-of-files/#comment-24308</link>
		<dc:creator>ibrahim</dc:creator>
		<pubDate>Fri, 04 Jan 2008 07:47:42 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=48#comment-24308</guid>
		<description>I run my program n times, each time I want to save run report in a file called test_report.xls. during the run time, the file should be test_report1.xls, test_report2.xls, ....,test_reportn.xls. please let me know how can I do that (adding 1, 2 ,...,n to the file name)

Thanks
Ibrahim</description>
		<content:encoded><![CDATA[<p>I run my program n times, each time I want to save run report in a file called test_report.xls. during the run time, the file should be test_report1.xls, test_report2.xls, &#8230;.,test_reportn.xls. please let me know how can I do that (adding 1, 2 ,&#8230;,n to the file name)</p>
<p>Thanks<br />
Ibrahim</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2006/08/02/processing-a-set-of-files/#comment-16300</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Wed, 27 Jun 2007 01:56:50 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=48#comment-16300</guid>
		<description>MJ-

Got any guesses since it&#039;s wavwrite to write them out?  Try using lookfor at the MATLAB prompt or searching the doc.  What happens if you look up wavwrite?  Does it help you at all?

--loren</description>
		<content:encoded><![CDATA[<p>MJ-</p>
<p>Got any guesses since it&#8217;s wavwrite to write them out?  Try using lookfor at the MATLAB prompt or searching the doc.  What happens if you look up wavwrite?  Does it help you at all?</p>
<p>&#8211;loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MJ</title>
		<link>http://blogs.mathworks.com/loren/2006/08/02/processing-a-set-of-files/#comment-16299</link>
		<dc:creator>MJ</dc:creator>
		<pubDate>Tue, 26 Jun 2007 20:42:44 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=48#comment-16299</guid>
		<description>How do I import WAV files into MATLAB for analysis of sound waves?</description>
		<content:encoded><![CDATA[<p>How do I import WAV files into MATLAB for analysis of sound waves?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jerker Wågberg</title>
		<link>http://blogs.mathworks.com/loren/2006/08/02/processing-a-set-of-files/#comment-9032</link>
		<dc:creator>Jerker Wågberg</dc:creator>
		<pubDate>Fri, 25 Aug 2006 13:19:31 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=48#comment-9032</guid>
		<description>Is it allowed to shamefully plug for my own contribution in FileExchange in this context? Filefun will handle these kind of tasks in a seemingly vectorized fashion á la cellfun et al.

Jerker
------
Yupp, that&#039;s my name. Same as the IKEA desk.</description>
		<content:encoded><![CDATA[<p>Is it allowed to shamefully plug for my own contribution in FileExchange in this context? Filefun will handle these kind of tasks in a seemingly vectorized fashion á la cellfun et al.</p>
<p>Jerker<br />
&#8212;&#8212;<br />
Yupp, that&#8217;s my name. Same as the IKEA desk.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: StephenL.CSSM</title>
		<link>http://blogs.mathworks.com/loren/2006/08/02/processing-a-set-of-files/#comment-8705</link>
		<dc:creator>StephenL.CSSM</dc:creator>
		<pubDate>Fri, 18 Aug 2006 14:31:42 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=48#comment-8705</guid>
		<description>Brad:  Thanks.  Agree about the speed.  I put in a enhancement request in for this.

Michael:  Thanks.  That&#039;s perfect.  To get to the end result needed: [nameWithSpace{:}] strings everything out into a char array.

Stephen</description>
		<content:encoded><![CDATA[<p>Brad:  Thanks.  Agree about the speed.  I put in a enhancement request in for this.</p>
<p>Michael:  Thanks.  That&#8217;s perfect.  To get to the end result needed: [nameWithSpace{:}] strings everything out into a char array.</p>
<p>Stephen</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://blogs.mathworks.com/loren/2006/08/02/processing-a-set-of-files/#comment-8663</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Fri, 18 Aug 2006 07:16:50 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/?p=48#comment-8663</guid>
		<description>@StephenL:

You can have the concatenation even easier, without resorting to arrayfun and anonymous functions:

files = dir(’*.mat’);
namesWithSpace = strcat(newpath,{files.name},{&#039; &#039;});

Michael</description>
		<content:encoded><![CDATA[<p>@StephenL:</p>
<p>You can have the concatenation even easier, without resorting to arrayfun and anonymous functions:</p>
<p>files = dir(’*.mat’);<br />
namesWithSpace = strcat(newpath,{files.name},{&#8216; &#8216;});</p>
<p>Michael</p>
]]></content:encoded>
	</item>
</channel>
</rss>

