<?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: Advanced MATLAB: File name processing from directory listing</title>
	<atom:link href="http://blogs.mathworks.com/pick/2008/09/09/advanced-matlab-file-name-processing-from-directory-listing/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/pick/2008/09/09/advanced-matlab-file-name-processing-from-directory-listing/</link>
	<description>&#60;a href=&#34;http://www.mathworks.com/matlabcentral/fileexchange/loadAuthor.do?objectId=1093599&#38;objectType=author&#34;&#62;Brett&#60;/a&#62; &#38; &#60;a href=&#34;http://www.mathworks.com/matlabcentral/fileexchange/loadAuthor.do?objectId=1094142&#38;objectType=author&#34;&#62;Jiro&#60;/a&#62; share favorite user-contributed submissions from the File Exchange.</description>
	<lastBuildDate>Fri, 10 Feb 2012 16:12:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Yuri</title>
		<link>http://blogs.mathworks.com/pick/2008/09/09/advanced-matlab-file-name-processing-from-directory-listing/#comment-14235</link>
		<dc:creator>Yuri</dc:creator>
		<pubDate>Tue, 13 Sep 2011 15:41:11 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2008/09/09/advanced-matlab-file-name-processing-from-directory-listing/#comment-14235</guid>
		<description>By the way, if someone need just a list of filenames, it can be done in several ways without for-loop.
&lt;pre&gt;
namelist = ls(&#039;*.dat&#039;); % as a char array
namelist = cellstr(ls(&#039;*.dat&#039;)); % as a cell array of strings
namelist = {files(:).name}&#039;; % from dir output
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>By the way, if someone need just a list of filenames, it can be done in several ways without for-loop.</p>
<pre>
namelist = ls('*.dat'); % as a char array
namelist = cellstr(ls('*.dat')); % as a cell array of strings
namelist = {files(:).name}'; % from dir output
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yuri</title>
		<link>http://blogs.mathworks.com/pick/2008/09/09/advanced-matlab-file-name-processing-from-directory-listing/#comment-14234</link>
		<dc:creator>Yuri</dc:creator>
		<pubDate>Tue, 13 Sep 2011 15:16:35 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2008/09/09/advanced-matlab-file-name-processing-from-directory-listing/#comment-14234</guid>
		<description>Doug, a small correction. &#039;*&#039; in regular expressions means 0 or more. It is &#039;+&#039; that mean 1 or more. So if we have a file &#039;data.dat&#039;, it will also match your regexp returning empty string as a token.</description>
		<content:encoded><![CDATA[<p>Doug, a small correction. &#8216;*&#8217; in regular expressions means 0 or more. It is &#8216;+&#8217; that mean 1 or more. So if we have a file &#8216;data.dat&#8217;, it will also match your regexp returning empty string as a token.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KASA</title>
		<link>http://blogs.mathworks.com/pick/2008/09/09/advanced-matlab-file-name-processing-from-directory-listing/#comment-14094</link>
		<dc:creator>KASA</dc:creator>
		<pubDate>Wed, 13 Apr 2011 19:13:19 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2008/09/09/advanced-matlab-file-name-processing-from-directory-listing/#comment-14094</guid>
		<description>Hello guys
Do you have any idea of how can I list files from the web site?
for example, I have many images that have this form 20110101_0000_c2_512.jpg to be processed the only thing changes is 20110101_THIS_c2_512.jpg and it has to be 4 digits start from 0000 to 2354
this is the website
http://sohowww.nascom.nasa.gov//data/REPROCESSING/Completed/2011/c2/20110101/
I want to list these files, just the image files.
your help is appreciated in advance</description>
		<content:encoded><![CDATA[<p>Hello guys<br />
Do you have any idea of how can I list files from the web site?<br />
for example, I have many images that have this form 20110101_0000_c2_512.jpg to be processed the only thing changes is 20110101_THIS_c2_512.jpg and it has to be 4 digits start from 0000 to 2354<br />
this is the website<br />
<a href="http://sohowww.nascom.nasa.gov//data/REPROCESSING/Completed/2011/c2/20110101/" rel="nofollow">http://sohowww.nascom.nasa.gov//data/REPROCESSING/Completed/2011/c2/20110101/</a><br />
I want to list these files, just the image files.<br />
your help is appreciated in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug</title>
		<link>http://blogs.mathworks.com/pick/2008/09/09/advanced-matlab-file-name-processing-from-directory-listing/#comment-13438</link>
		<dc:creator>Doug</dc:creator>
		<pubDate>Thu, 25 Feb 2010 20:52:12 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2008/09/09/advanced-matlab-file-name-processing-from-directory-listing/#comment-13438</guid>
		<description>@Kaija,

Use {} not ()

Doug</description>
		<content:encoded><![CDATA[<p>@Kaija,</p>
<p>Use {} not ()</p>
<p>Doug</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kaija</title>
		<link>http://blogs.mathworks.com/pick/2008/09/09/advanced-matlab-file-name-processing-from-directory-listing/#comment-13437</link>
		<dc:creator>Kaija</dc:creator>
		<pubDate>Wed, 24 Feb 2010 09:21:19 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2008/09/09/advanced-matlab-file-name-processing-from-directory-listing/#comment-13437</guid>
		<description>Hi

I&#039;m trying to get the number from my filename, and I&#039;m doing exactly as shown in the video, but when I type ans(1) my answer is 1x1 cell.
Do you know what I&#039;m doing wrong?

/Kaija

My filename is tpjp199202.mon and my commands are:

files=dir(&#039;*.mon&#039;);
name=files(1).name;
regexp(name,&#039;tpjp(\d*).mon&#039;,&#039;tokens&#039;);
ans

  ans = 

      {1x1 cell}

ans(1)

  ans = 

      {1x1 cell}</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>I&#8217;m trying to get the number from my filename, and I&#8217;m doing exactly as shown in the video, but when I type ans(1) my answer is 1&#215;1 cell.<br />
Do you know what I&#8217;m doing wrong?</p>
<p>/Kaija</p>
<p>My filename is tpjp199202.mon and my commands are:</p>
<p>files=dir(&#8216;*.mon&#8217;);<br />
name=files(1).name;<br />
regexp(name,&#8217;tpjp(\d*).mon&#8217;,'tokens&#8217;);<br />
ans</p>
<p>  ans = </p>
<p>      {1&#215;1 cell}</p>
<p>ans(1)</p>
<p>  ans = </p>
<p>      {1&#215;1 cell}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug</title>
		<link>http://blogs.mathworks.com/pick/2008/09/09/advanced-matlab-file-name-processing-from-directory-listing/#comment-12787</link>
		<dc:creator>Doug</dc:creator>
		<pubDate>Tue, 09 Sep 2008 15:35:40 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2008/09/09/advanced-matlab-file-name-processing-from-directory-listing/#comment-12787</guid>
		<description>Matt,

That is an excellent suggestion.  I just posted it to our internal enhancement tracking database.  You can make such requests more reliably by e-mailing support@mathworks.com

Thanks,
Doug</description>
		<content:encoded><![CDATA[<p>Matt,</p>
<p>That is an excellent suggestion.  I just posted it to our internal enhancement tracking database.  You can make such requests more reliably by e-mailing <a href="mailto:support@mathworks.com">support@mathworks.com</a></p>
<p>Thanks,<br />
Doug</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug</title>
		<link>http://blogs.mathworks.com/pick/2008/09/09/advanced-matlab-file-name-processing-from-directory-listing/#comment-12786</link>
		<dc:creator>Doug</dc:creator>
		<pubDate>Tue, 09 Sep 2008 15:30:00 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2008/09/09/advanced-matlab-file-name-processing-from-directory-listing/#comment-12786</guid>
		<description>David,

Actually, I tend to do a little bit of both.  It is hard to say when I work at the command line and then script and when I write a script and just keep running it as you add to it.

Doug</description>
		<content:encoded><![CDATA[<p>David,</p>
<p>Actually, I tend to do a little bit of both.  It is hard to say when I work at the command line and then script and when I write a script and just keep running it as you add to it.</p>
<p>Doug</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt fig</title>
		<link>http://blogs.mathworks.com/pick/2008/09/09/advanced-matlab-file-name-processing-from-directory-listing/#comment-12785</link>
		<dc:creator>matt fig</dc:creator>
		<pubDate>Tue, 09 Sep 2008 15:28:47 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2008/09/09/advanced-matlab-file-name-processing-from-directory-listing/#comment-12785</guid>
		<description>Off topic, but David&#039;s reply made me think about an enhancement I would like to see.  Imagine scrolling up through the command history, either through the editor or by using the up arrow.  When you came across a command that caused an error, it would be in red font.  Boy that would make life simpler when looking through several similar commands, some of which didn&#039;t work.</description>
		<content:encoded><![CDATA[<p>Off topic, but David&#8217;s reply made me think about an enhancement I would like to see.  Imagine scrolling up through the command history, either through the editor or by using the up arrow.  When you came across a command that caused an error, it would be in red font.  Boy that would make life simpler when looking through several similar commands, some of which didn&#8217;t work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: david</title>
		<link>http://blogs.mathworks.com/pick/2008/09/09/advanced-matlab-file-name-processing-from-directory-listing/#comment-12784</link>
		<dc:creator>david</dc:creator>
		<pubDate>Tue, 09 Sep 2008 15:08:34 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/pick/2008/09/09/advanced-matlab-file-name-processing-from-directory-listing/#comment-12784</guid>
		<description>nice. just a thought:
rather than trying ideas in the command window, one idea is to do this using the editor in cell mode. that way,  when you&#039;ve figured out the right syntax, you almost have a finished script. this also saves scrolling through the command history for the correct version of each command which after trial-and-error often look similar to versions that don&#039;t quite work

regards,
david</description>
		<content:encoded><![CDATA[<p>nice. just a thought:<br />
rather than trying ideas in the command window, one idea is to do this using the editor in cell mode. that way,  when you&#8217;ve figured out the right syntax, you almost have a finished script. this also saves scrolling through the command history for the correct version of each command which after trial-and-error often look similar to versions that don&#8217;t quite work</p>
<p>regards,<br />
david</p>
]]></content:encoded>
	</item>
</channel>
</rss>

