<?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: When MATLAB Refreshes Directories</title>
	<atom:link href="http://blogs.mathworks.com/loren/2008/12/11/when-matlab-refreshes-directories/feed/" rel="self" type="application/rss+xml" />
	<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 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: Loren</title>
		<link>http://blogs.mathworks.com/loren/2008/12/11/when-matlab-refreshes-directories/#comment-31614</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Sun, 22 Aug 2010 12:27:48 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/12/11/when-matlab-refreshes-directories/#comment-31614</guid>
		<description>Jeff-

I don&#039;t know of a way to change the behavior you are seeing.  Do be sure you are not working on files sitting inside the installation area (e.g., matlab/toolbox).  That will always require the rehash.  Outside should not typically.  I recommend you send some particular files and locations to tech support and get some help on this.

--Loren</description>
		<content:encoded><![CDATA[<p>Jeff-</p>
<p>I don&#8217;t know of a way to change the behavior you are seeing.  Do be sure you are not working on files sitting inside the installation area (e.g., matlab/toolbox).  That will always require the rehash.  Outside should not typically.  I recommend you send some particular files and locations to tech support and get some help on this.</p>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Book</title>
		<link>http://blogs.mathworks.com/loren/2008/12/11/when-matlab-refreshes-directories/#comment-31598</link>
		<dc:creator>Jeff Book</dc:creator>
		<pubDate>Tue, 17 Aug 2010 18:43:37 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/12/11/when-matlab-refreshes-directories/#comment-31598</guid>
		<description>I am just moving my daily programming from MATLAB 6.5 to 7.4.0 now.  In 6.5 my functions did not need a clear command in order to rehash, but in 7.4.0 it seems that every time I make a change inside the function and save the change in an editor I have to issue a  command before the changes are recognized.  Is there any way to restore 6.5 rehash behavior so I don&#039;t have to keep retyping these clears?</description>
		<content:encoded><![CDATA[<p>I am just moving my daily programming from MATLAB 6.5 to 7.4.0 now.  In 6.5 my functions did not need a clear command in order to rehash, but in 7.4.0 it seems that every time I make a change inside the function and save the change in an editor I have to issue a  command before the changes are recognized.  Is there any way to restore 6.5 rehash behavior so I don&#8217;t have to keep retyping these clears?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2008/12/11/when-matlab-refreshes-directories/#comment-31464</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Sun, 27 Jun 2010 14:27:48 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/12/11/when-matlab-refreshes-directories/#comment-31464</guid>
		<description>Ser-

You have limited control on retaining older versions of updated functions and you can not have 2 versions at the same time.  Create 2 separate functions for that scenario.

--Loren</description>
		<content:encoded><![CDATA[<p>Ser-</p>
<p>You have limited control on retaining older versions of updated functions and you can not have 2 versions at the same time.  Create 2 separate functions for that scenario.</p>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ser</title>
		<link>http://blogs.mathworks.com/loren/2008/12/11/when-matlab-refreshes-directories/#comment-31463</link>
		<dc:creator>Ser</dc:creator>
		<pubDate>Sun, 27 Jun 2010 00:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/12/11/when-matlab-refreshes-directories/#comment-31463</guid>
		<description>&gt; &quot;You can force a rehash with the command but can’t prevent one from happening&quot; (Loren)

Is that right? If for example:

==========================================
1) I want to do a run (lets call it RUN-1) on my working directory of a Matlab &quot;myscript.m&quot; that has loop inside calling a &quot;myfunction.m&quot; every 30min. 

2) RUN-1 will last for 24h (ie. &quot;myfunction.m&quot; is going to be called 48 times)

3) In the meanwhile I want to make some changes to &quot;myfunction.m&quot; for a new and different run (lets call it RUN-2)

4) RUN-2 will be sent to run a few minutes after RUN-1 as an independent job on my working directory as well.

5) Therefore, I don&#039;t want those changes on &quot;myfunction.m&quot; done for RUN-2 to affect the already running RUN-1 (ie. I don&#039;t want RUN-1 to update / refresh / rehash the changes done to &quot;myfunction.m&quot;). 

6) In other words:

# I want the loop on RUN-1 to keep calling the old (unchanged) version of &quot;myfunction.m&quot; (the one in the cache)

# I want the loop on RUN-2 to call the new (changed) version of &quot;myfunction.m&quot;

7) All this while working in the same working directory, obviously.

8) How do I do then? How can prevent RUN-1 to &quot;see&quot; the changes I&#039;m making to &quot;myfunction.m&quot; while it is running?
==========================================

Thanks you.

Kind regards.

Ser.</description>
		<content:encoded><![CDATA[<p>&gt; &#8220;You can force a rehash with the command but can’t prevent one from happening&#8221; (Loren)</p>
<p>Is that right? If for example:</p>
<p>==========================================<br />
1) I want to do a run (lets call it RUN-1) on my working directory of a Matlab &#8220;myscript.m&#8221; that has loop inside calling a &#8220;myfunction.m&#8221; every 30min. </p>
<p>2) RUN-1 will last for 24h (ie. &#8220;myfunction.m&#8221; is going to be called 48 times)</p>
<p>3) In the meanwhile I want to make some changes to &#8220;myfunction.m&#8221; for a new and different run (lets call it RUN-2)</p>
<p>4) RUN-2 will be sent to run a few minutes after RUN-1 as an independent job on my working directory as well.</p>
<p>5) Therefore, I don&#8217;t want those changes on &#8220;myfunction.m&#8221; done for RUN-2 to affect the already running RUN-1 (ie. I don&#8217;t want RUN-1 to update / refresh / rehash the changes done to &#8220;myfunction.m&#8221;). </p>
<p>6) In other words:</p>
<p># I want the loop on RUN-1 to keep calling the old (unchanged) version of &#8220;myfunction.m&#8221; (the one in the cache)</p>
<p># I want the loop on RUN-2 to call the new (changed) version of &#8220;myfunction.m&#8221;</p>
<p>7) All this while working in the same working directory, obviously.</p>
<p>8) How do I do then? How can prevent RUN-1 to &#8220;see&#8221; the changes I&#8217;m making to &#8220;myfunction.m&#8221; while it is running?<br />
==========================================</p>
<p>Thanks you.</p>
<p>Kind regards.</p>
<p>Ser.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2008/12/11/when-matlab-refreshes-directories/#comment-31049</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Thu, 04 Feb 2010 14:22:33 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/12/11/when-matlab-refreshes-directories/#comment-31049</guid>
		<description>HC-

You can force a rehash with the command but can&#039;t prevent one from happening.  Are you sure that&#039;s what&#039;s really going on in your application?  MATLAB tries to be smart about when to rehash rather than doing it all the time.  If you can send a sample of your application that you think does excessive rehash to technical support (see link on right), we can investigate it.

--Loren</description>
		<content:encoded><![CDATA[<p>HC-</p>
<p>You can force a rehash with the command but can&#8217;t prevent one from happening.  Are you sure that&#8217;s what&#8217;s really going on in your application?  MATLAB tries to be smart about when to rehash rather than doing it all the time.  If you can send a sample of your application that you think does excessive rehash to technical support (see link on right), we can investigate it.</p>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: HC</title>
		<link>http://blogs.mathworks.com/loren/2008/12/11/when-matlab-refreshes-directories/#comment-31048</link>
		<dc:creator>HC</dc:creator>
		<pubDate>Thu, 04 Feb 2010 13:06:00 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/12/11/when-matlab-refreshes-directories/#comment-31048</guid>
		<description>Is it possible to disable rehashing?  Sometimes I work with large paths with lots of files in them, which seems to slow MATLAB does a lot.  In these cases I would prefer to disable rehashing (or whatever is causing the performance issue) and just be forced to explicitly call it.

I would also like to disable rehashing on specific folders.  For example, I create my own &quot;toolboxes&quot; which almost never change, so MATLAB should be able to just cache the functions in them and not have to refresh this most of the time, similar to what it does for built-in toolboxes.</description>
		<content:encoded><![CDATA[<p>Is it possible to disable rehashing?  Sometimes I work with large paths with lots of files in them, which seems to slow MATLAB does a lot.  In these cases I would prefer to disable rehashing (or whatever is causing the performance issue) and just be forced to explicitly call it.</p>
<p>I would also like to disable rehashing on specific folders.  For example, I create my own &#8220;toolboxes&#8221; which almost never change, so MATLAB should be able to just cache the functions in them and not have to refresh this most of the time, similar to what it does for built-in toolboxes.</p>
]]></content:encoded>
	</item>
	<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 isPermaLink="false">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&#039;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&#039;t recognize there&#039;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 isPermaLink="false">http://blogs.mathworks.com/loren/2008/12/11/when-matlab-refreshes-directories/#comment-30755</guid>
		<description>Maybe you can tell that I&#039;m catching up on your old columns.

Anyway, I&#039;m surprised that no one commented on this.

The topic title seems attractive, but I can&#039;t follow anything about this.

What is the function fcnBug suppose to do?  I&#039;m guessing this is just to illustrate some subtle detail regarding the path precedence.  But, I can&#039;t figure out what the expected results of this function are.

What are the id &amp; 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>

