<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: When MATLAB Refreshes Directories</title>
	<link>http://blogs.mathworks.com/loren/2008/12/11/when-matlab-refreshes-directories/</link>
	<description>Loren Shure  works on design of the MATLAB language at &#60;a href="http://www.mathworks.com/"&#62;The MathWorks&#60;/a&#62;. She writes here about once a week on MATLAB programming and related topics. &#60;br&#62;&#60;br&#62;&#60;a href="/images/loren-full.jpg"&#62;&#60;img src="/images/loren.jpg"&#62;&#60;/a&#62;</description>
	<pubDate>Mon, 23 Nov 2009 00:50:27 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2008/12/11/when-matlab-refreshes-directories/#comment-30757</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Tue, 10 Nov 2009 12:56:38 +0000</pubDate>
		<guid>http://blogs.mathworks.com/loren/2008/12/11/when-matlab-refreshes-directories/#comment-30757</guid>
		<description>OysterEngineer-

fcnTest.m is a file that the user is writing out in the course of calculations.  The point was to show how to, and how not to, write a new file out during the course of calculations so that it could get recognized and used later in the processing.

mode is controlling whether you clear or use exist to see if the function fcnTest is available.  And you might use both.

id was used in the commented version of fcnBug so you could tell whether version 1, 2, 3, or 4 was the one being found (versus what you might expect).

To understand more details, which are a bit nuanced (and clearly I haven't shown them well here), you could try experimenting with the code yourself.  The nuances come from how you run the function and therefore get different results.  If you run in the debugger, all is well.  If you run in the normal fashion, you get issues because the file was cached and MATLAB doesn't recognize there's a new version without some intervention.  clear is the way to go, but it matters where/when you perform the clear.

The main thing to notice is the use of clear near the top of the repaired function.  That is the key to getting the new code recognized under all the different circumstances.  

--Loren</description>
		<content:encoded><![CDATA[<p>OysterEngineer-</p>
<p>fcnTest.m is a file that the user is writing out in the course of calculations.  The point was to show how to, and how not to, write a new file out during the course of calculations so that it could get recognized and used later in the processing.</p>
<p>mode is controlling whether you clear or use exist to see if the function fcnTest is available.  And you might use both.</p>
<p>id was used in the commented version of fcnBug so you could tell whether version 1, 2, 3, or 4 was the one being found (versus what you might expect).</p>
<p>To understand more details, which are a bit nuanced (and clearly I haven&#8217;t shown them well here), you could try experimenting with the code yourself.  The nuances come from how you run the function and therefore get different results.  If you run in the debugger, all is well.  If you run in the normal fashion, you get issues because the file was cached and MATLAB doesn&#8217;t recognize there&#8217;s a new version without some intervention.  clear is the way to go, but it matters where/when you perform the clear.</p>
<p>The main thing to notice is the use of clear near the top of the repaired function.  That is the key to getting the new code recognized under all the different circumstances.  </p>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: OysterEngineer</title>
		<link>http://blogs.mathworks.com/loren/2008/12/11/when-matlab-refreshes-directories/#comment-30755</link>
		<dc:creator>OysterEngineer</dc:creator>
		<pubDate>Mon, 09 Nov 2009 23:09:42 +0000</pubDate>
		<guid>http://blogs.mathworks.com/loren/2008/12/11/when-matlab-refreshes-directories/#comment-30755</guid>
		<description>Maybe you can tell that I'm catching up on your old columns.

Anyway, I'm surprised that no one commented on this.

The topic title seems attractive, but I can't follow anything about this.

What is the function fcnBug suppose to do?  I'm guessing this is just to illustrate some subtle detail regarding the path precedence.  But, I can't figure out what the expected results of this function are.

What are the id &#38; mode variables controlling?

Also, what is this fcnPuzzle?



And, where us this fcnTest.m?  What does it do?</description>
		<content:encoded><![CDATA[<p>Maybe you can tell that I&#8217;m catching up on your old columns.</p>
<p>Anyway, I&#8217;m surprised that no one commented on this.</p>
<p>The topic title seems attractive, but I can&#8217;t follow anything about this.</p>
<p>What is the function fcnBug suppose to do?  I&#8217;m guessing this is just to illustrate some subtle detail regarding the path precedence.  But, I can&#8217;t figure out what the expected results of this function are.</p>
<p>What are the id &amp; mode variables controlling?</p>
<p>Also, what is this fcnPuzzle?</p>
<p>And, where us this fcnTest.m?  What does it do?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
