<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/262542</link>
    <title>MATLAB Central Newsreader - &quot;Change directory&quot; dialog box</title>
    <description>Feed for thread: &quot;Change directory&quot; dialog box</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Wed, 07 Oct 2009 15:57:02 -0400</pubDate>
      <title>&quot;Change directory&quot; dialog box</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/262542#685378</link>
      <author>Andr&#233; Brito</author>
      <description>Hello,&lt;br&gt;
&lt;br&gt;
is there any way (other than adding a line of code in every file) to set the MATLAB preferences such that the default behavior for running m-files is to change the current directory to the directory where the file is located ?&lt;br&gt;
&lt;br&gt;
The dialog that appear has the options &quot;Change Directory&quot;, &quot;Add to Path&quot;, &quot;Cancel&quot;, and &quot;Help&quot;.&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
Andr</description>
    </item>
    <item>
      <pubDate>Wed, 07 Oct 2009 17:58:45 -0400</pubDate>
      <title>Re: &quot;Change directory&quot; dialog box</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/262542#685396</link>
      <author>dpb</author>
      <description>Andre Brito wrote:&lt;br&gt;
&amp;gt; Hello,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; is there any way (other than adding a line of code in every file) to&lt;br&gt;
&amp;gt; set the MATLAB preferences such that the default behavior for running&lt;br&gt;
&amp;gt; m-files is to change the current directory to the directory where the&lt;br&gt;
&amp;gt; file is located ?&lt;br&gt;
...&lt;br&gt;
&lt;br&gt;
automagically, how is it to know where the m-file is located unless the &lt;br&gt;
directory containing the m-file is already in the search path or the cwd?&lt;br&gt;
&lt;br&gt;
I don't see a way to do this other than by having the m-file make such a &lt;br&gt;
change on its own which seems a poor idea.&lt;br&gt;
&lt;br&gt;
In general, one organizes ML files into project-related directories and &lt;br&gt;
makes a high-level startup file to set the proper parameters for a given &lt;br&gt;
project that would include setting working directory, path for &lt;br&gt;
project-specific files, etc.&lt;br&gt;
&lt;br&gt;
OTOH, most users also create their subdirectories of custom functions &lt;br&gt;
that are more generic that they want available between projects and use &lt;br&gt;
the preferences files or startup to set the search path for such &lt;br&gt;
directory(ies).&lt;br&gt;
&lt;br&gt;
What, specifically, kind of an issue are you trying to solve--perhaps &lt;br&gt;
more background would lead to other ideas/solutions others have had for &lt;br&gt;
similar situations.&lt;br&gt;
&lt;br&gt;
--</description>
    </item>
    <item>
      <pubDate>Wed, 07 Oct 2009 18:23:47 -0400</pubDate>
      <title>Re: &quot;Change directory&quot; dialog box</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/262542#685402</link>
      <author>ImageAnalyst</author>
      <description>On Oct 7, 11:57&#160;am, &quot;Andre Brito&quot; &amp;lt;andre_brit...@hotmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; Hello,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; is there any way (other than adding a line of code in every file) to set the MATLAB preferences such that the default behavior for running m-files is to change the current directory to the directory where the file is located ?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; The dialog that appear has the options &quot;Change Directory&quot;, &quot;Add to Path&quot;, &quot;Cancel&quot;, and &quot;Help&quot;.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Thanks,&lt;br&gt;
&amp;gt; Andr&lt;br&gt;
&lt;br&gt;
---------------------------------------------------------------&lt;br&gt;
No there is not.  This is something I've brought up with them before,&lt;br&gt;
and will reiterate when I meeti with their developers later this&lt;br&gt;
month.  It would be a big convenience.  I keep hoping.</description>
    </item>
    <item>
      <pubDate>Thu, 08 Oct 2009 10:52:02 -0400</pubDate>
      <title>Re: &quot;Change directory&quot; dialog box</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/262542#685571</link>
      <author>Andr&#233; Brito</author>
      <description>dpb &amp;lt;none@non.net&amp;gt; wrote in message &amp;lt;hail59$ojp$1@news.eternal-september.org&amp;gt;...&lt;br&gt;
&amp;gt; automagically, how is it to know where the m-file is located unless the &lt;br&gt;
&amp;gt; directory containing the m-file is already in the search path or the cwd?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I don't see a way to do this other than by having the m-file make such a &lt;br&gt;
&amp;gt; change on its own which seems a poor idea.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; In general, one organizes ML files into project-related directories and &lt;br&gt;
&amp;gt; makes a high-level startup file to set the proper parameters for a given &lt;br&gt;
&amp;gt; project that would include setting working directory, path for &lt;br&gt;
&amp;gt; project-specific files, etc.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; OTOH, most users also create their subdirectories of custom functions &lt;br&gt;
&amp;gt; that are more generic that they want available between projects and use &lt;br&gt;
&amp;gt; the preferences files or startup to set the search path for such &lt;br&gt;
&amp;gt; directory(ies).&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; What, specifically, kind of an issue are you trying to solve--perhaps &lt;br&gt;
&amp;gt; more background would lead to other ideas/solutions others have had for &lt;br&gt;
&amp;gt; similar situations.&lt;br&gt;
&lt;br&gt;
It's just a project where I'm constantly bouncing between directories at the same level. As there are other versions of the same files in other directories I can't add these working directories to the path, which would lead to a big mess, as you can imagine.&lt;br&gt;
&lt;br&gt;
By the way, nice OTOH acronym!&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
ImageAnalyst &amp;lt;imageanalyst@mailinator.com&amp;gt; wrote in message &amp;lt;021bf50b-6fc8-40fe-978f-ae9f9e0b1a5d@l34g2000vba.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; No there is not.  This is something I've brought up with them before,&lt;br&gt;
&amp;gt; and will reiterate when I meet with their developers later this&lt;br&gt;
&amp;gt; month.  It would be a big convenience.  I keep hoping.&lt;br&gt;
&lt;br&gt;
Wow, you get to have meetings with the developers?&lt;br&gt;
&lt;br&gt;
Andr</description>
    </item>
    <item>
      <pubDate>Thu, 08 Oct 2009 13:02:13 -0400</pubDate>
      <title>Re: &quot;Change directory&quot; dialog box</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/262542#685630</link>
      <author>dpb</author>
      <description>Andre Brito wrote:&lt;br&gt;
...&lt;br&gt;
&amp;gt; By the way, nice OTOH acronym!&lt;br&gt;
...&lt;br&gt;
Not of my making, certainly...&lt;br&gt;
&lt;br&gt;
--</description>
    </item>
    <item>
      <pubDate>Thu, 08 Oct 2009 16:06:00 -0400</pubDate>
      <title>Re: &quot;Change directory&quot; dialog box</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/262542#685704</link>
      <author>Jan Simon</author>
      <description>Dear Andre!&lt;br&gt;
&lt;br&gt;
&amp;gt; is there any way (other than adding a line of code in every file) to set the MATLAB preferences such that the default behavior for running m-files is to change the current directory to the directory where the file is located ?&lt;br&gt;
&lt;br&gt;
This behaviour would be really confusing!&lt;br&gt;
E.g. if you call FOPEN, the current directory would be matlabroot\toolboxmatlab\iofun\ and a file without a path is searched there. If you call FOPEN(WHICH(FileName)), the file is searched in matlabroot\toolbox\matlab\general at first...&lt;br&gt;
I think, the frequent changes when calling &quot;SIN(a + ABS(b))&quot; would slow down Matlab completely: The + should change the current folder to the location of &quot;plus.m&quot; --- except if [b] is an object with an own PLUS operator...&lt;br&gt;
&lt;br&gt;
I have a simple tool for situations like yours: A dialog has a popup, which activates different path sets. In fact, even the GUI is not needed:&lt;br&gt;
&amp;nbsp;&amp;nbsp;% Use ADDPATH/RMPATH to create one path;&lt;br&gt;
&amp;nbsp;&amp;nbsp;Path1 = path;&lt;br&gt;
&amp;nbsp;&amp;nbsp;% Use ADDPATH/RMPATH to create other path;&lt;br&gt;
&amp;nbsp;&amp;nbsp;Path2 = path;&lt;br&gt;
Now you can toggle the paths, e.g.:&lt;br&gt;
&amp;nbsp;&amp;nbsp;path(Path1)&lt;br&gt;
This will fail, if the current directory contains some of the called M-Files. So just CD to a neutral location.&lt;br&gt;
&lt;br&gt;
A GUI for this has the advantage, that even the debugger break points can be stored/restored automatically in the callback, if the directory is changed.&lt;br&gt;
&lt;br&gt;
Kind regards, Jan</description>
    </item>
    <item>
      <pubDate>Fri, 09 Oct 2009 12:41:14 -0400</pubDate>
      <title>Re: &quot;Change directory&quot; dialog box</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/262542#685941</link>
      <author>ImageAnalyst</author>
      <description>On Oct 8, 6:52&#160;am, &quot;Andre Brito&quot; &amp;lt;andre_brit...@hotmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; ImageAnalyst &amp;lt;imageanal...@mailinator.com&amp;gt; wrote in message &amp;lt;021bf50b-6fc8-40fe-978f-ae9f9e0b1...@l34g2000vba.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; No there is not. &#160;This is something I've brought up with them before,&lt;br&gt;
&amp;gt; &amp;gt; and will reiterate when I meet with theirdeveloperslater this&lt;br&gt;
&amp;gt; &amp;gt; month. &#160;It would be a big convenience. &#160;I keep hoping.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Wow, you get to have meetings with thedevelopers?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Andr-&lt;br&gt;
----------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br&gt;
Andr:&lt;br&gt;
It's not unusual (fortunately).  I imagine many people who you see&lt;br&gt;
frequently in this newsgroup also have.  It's nice that The Mathworks&lt;br&gt;
and other software companies (e.g. Microsoft, etc.) meet with heavy&lt;br&gt;
users of their products to learn of their needs.  It helps them design&lt;br&gt;
and develop better products for the future that will help us all.&lt;br&gt;
Since my job function is image analysis and I program in MATLAB every&lt;br&gt;
hour at work (when I'm not doing email, organizing symposia, having&lt;br&gt;
meetings, eating lunch, etc.), as well as many hours when not at work,&lt;br&gt;
I guess that qualifies me.  Of course they'll listen to any user if&lt;br&gt;
you send a suggestion, comment, or bug report to&lt;br&gt;
support@mathworks.com.&lt;br&gt;
Regards,&lt;br&gt;
ImageAnalyst</description>
    </item>
    <item>
      <pubDate>Fri, 09 Oct 2009 14:07:02 -0400</pubDate>
      <title>Re: &quot;Change directory&quot; dialog box</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/262542#685973</link>
      <author>Andr&#233; Brito</author>
      <description>&quot;Jan Simon&quot; &amp;lt;matlab.THIS_YEAR@nMINUSsimon.de&amp;gt; wrote in message &amp;lt;hal2l8$25f$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Dear Andre!&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; is there any way (other than adding a line of code in every file) to set the MATLAB preferences such that the default behavior for running m-files is to change the current directory to the directory where the file is located ?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; This behaviour would be really confusing!&lt;br&gt;
&amp;gt; E.g. if you call FOPEN, the current directory would be matlabroot\toolboxmatlab\iofun\ and a file without a path is searched there. If you call FOPEN(WHICH(FileName)), the file is searched in matlabroot\toolbox\matlab\general at first...&lt;br&gt;
&amp;gt; I think, the frequent changes when calling &quot;SIN(a + ABS(b))&quot; would slow down Matlab completely: The + should change the current folder to the location of &quot;plus.m&quot; --- except if [b] is an object with an own PLUS operator...&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Allow me to disagree: the pop-up dialog only shows up if you are trying to run an m-file which is located in a directory which is not included in the path. If you run FOPEN, for example, MATLAB knows where to search for it.&lt;br&gt;
&lt;br&gt;
When the dialog shows up and when you press &quot;Change directory&quot;, I assume that MATLAB adds this directory temporarily to the path and removes it in the end. This is the behavior I would like to be possible to be set as default in some check box in the MATLAB Preferences.&lt;br&gt;
&lt;br&gt;
Andre</description>
    </item>
    <item>
      <pubDate>Fri, 09 Oct 2009 14:22:24 -0400</pubDate>
      <title>Re: &quot;Change directory&quot; dialog box</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/262542#685976</link>
      <author>ImageAnalyst</author>
      <description>On Oct 9, 10:07&#160;am, &quot;Andre Brito&quot; &amp;lt;andre_brit...@hotmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; &quot;Jan Simon&quot; &amp;lt;matlab.THIS_Y...@nMINUSsimon.de&amp;gt; wrote in message &amp;lt;hal2l8$25...@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Dear Andre!&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; is there any way (other than adding a line of code in every file) to set the MATLAB preferences such that the default behavior for running m-files is to change the current directory to the directory where the file is located ?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; This behaviour would be really confusing!&lt;br&gt;
&amp;gt; &amp;gt; E.g. if you call FOPEN, the current directory would be matlabroot\toolboxmatlab\iofun\ and a file without a path is searched there. If you call FOPEN(WHICH(FileName)), the file is searched in matlabroot\toolbox\matlab\general at first...&lt;br&gt;
&amp;gt; &amp;gt; I think, the frequent changes when calling &quot;SIN(a + ABS(b))&quot; would slow down Matlab completely: The + should change the current folder to the location of &quot;plus.m&quot; --- except if [b] is an object with an own PLUS operator...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Allow me to disagree: the pop-up dialog only shows up if you are trying to run an m-file which is located in a directory which is not included in the path. If you run FOPEN, for example, MATLAB knows where to search for it.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; When the dialog shows up and when you press &quot;Change directory&quot;, I assume that MATLAB adds this directory temporarily to the path and removes it in the end. This is the behavior I would like to be possible to be set as default in some check box in the MATLAB Preferences.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Andre&lt;br&gt;
&lt;br&gt;
-------------------------------------------------------------&lt;br&gt;
I gotta agree with Andre on this.  I have dozens of MATLAB projects,&lt;br&gt;
each in it's own folder, and I frequently switch between them by&lt;br&gt;
clicking of the name in the bottom line of the code editor.  If I&lt;br&gt;
forgot to do the extra step of changing the current folder, it's&lt;br&gt;
always a pain to either have a bunch of error messages (if it tries to&lt;br&gt;
run it), or else be presented with the &quot;Add to path&quot; &quot;Change folder&quot;&lt;br&gt;
prompt.  Having it switch automatically would eliminate that pain for&lt;br&gt;
me.  At least give me the opportunity of having that be an option/&lt;br&gt;
preference I can either select or not.</description>
    </item>
    <item>
      <pubDate>Fri, 09 Oct 2009 14:55:25 -0400</pubDate>
      <title>Re: &quot;Change directory&quot; dialog box</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/262542#685984</link>
      <author>Jan Simon</author>
      <description>Dear Andre!&lt;br&gt;
&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; is there any way (other than adding a line of code in every file) to set the MATLAB preferences such that the default behavior for running m-files is to change the current directory to the directory where the file is located ?&lt;br&gt;
&lt;br&gt;
&amp;gt; Allow me to disagree: the pop-up dialog only shows up if you are trying to run an m-file which is located in a directory which is not included in the path. If you run FOPEN, for example, MATLAB knows where to search for it.&lt;br&gt;
&lt;br&gt;
So I think, I did not understand, when you want to change the directory.&lt;br&gt;
&lt;br&gt;
What do you mean by &quot;running m-files&quot;?&lt;br&gt;
&lt;br&gt;
Do you mean the behaviour of the Run-Button from the editor? Then the change of the directory happens only once at pressing the button.&lt;br&gt;
I meant the currently running M-file, which is a completely different story.&lt;br&gt;
&lt;br&gt;
Kind regards, Jan</description>
    </item>
    <item>
      <pubDate>Fri, 09 Oct 2009 16:20:21 -0400</pubDate>
      <title>Re: &quot;Change directory&quot; dialog box</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/262542#686005</link>
      <author>Andr&#233; Brito</author>
      <description>&quot;Jan Simon&quot; &amp;lt;matlab.THIS_YEAR@nMINUSsimon.de&amp;gt; wrote in message &amp;lt;hanist$p3$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; So I think, I did not understand, when you want to change the directory.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; What do you mean by &quot;running m-files&quot;?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Do you mean the behaviour of the Run-Button from the editor? Then the change of the directory happens only once at pressing the button.&lt;br&gt;
&amp;gt; I meant the currently running M-file, which is a completely different story.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Kind regards, Jan&lt;br&gt;
&lt;br&gt;
Yes, I meant the the run-button in the editor! Sorry about the mix up.&lt;br&gt;
&lt;br&gt;
Andre</description>
    </item>
    <item>
      <pubDate>Fri, 09 Oct 2009 16:45:48 -0400</pubDate>
      <title>Re: &quot;Change directory&quot; dialog box</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/262542#686007</link>
      <author>ImageAnalyst</author>
      <description>On Oct 9, 12:20&#160;pm, &quot;Andre Brito&quot; &amp;lt;andre_brit...@hotmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; &quot;Jan Simon&quot; &amp;lt;matlab.THIS_Y...@nMINUSsimon.de&amp;gt; wrote in message &amp;lt;hanist$p...@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; So I think, I did not understand, when you want to change the directory.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; What do you mean by &quot;running m-files&quot;?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Do you mean the behaviour of the Run-Button from the editor? Then the change of the directory happens only once at pressing the button.&lt;br&gt;
&amp;gt; &amp;gt; I meant the currently running M-file, which is a completely different story.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Kind regards, Jan&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Yes, I meant the the run-button in the editor! Sorry about the mix up.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Andre&lt;br&gt;
&lt;br&gt;
-------------------------------------&lt;br&gt;
Well for me, I'd just as soon have it change directory immediately&lt;br&gt;
upon selecting the m-file that you're going to work with.  So you&lt;br&gt;
click on the filename in the &quot;task bar&quot; (or whatever you call it) and&lt;br&gt;
the code window switches to the code for that m-file, and then I'd&lt;br&gt;
like it to change the current folder right then - why wait until you&lt;br&gt;
run it (by clicking on the green triangle).  If you changed only after&lt;br&gt;
you ran it, then you have this intermediate state where the displayed&lt;br&gt;
code and the current folder don't match.  Then after you click &quot;run&quot;&lt;br&gt;
they do match.  So I don't want the discrepancy of having different&lt;br&gt;
current folders when looking at some code, depending on whether I ran&lt;br&gt;
the code or not.</description>
    </item>
    <item>
      <pubDate>Fri, 09 Oct 2009 19:19:03 -0400</pubDate>
      <title>Re: &quot;Change directory&quot; dialog box</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/262542#686030</link>
      <author>Jan Simon</author>
      <description>Dear ImageAnalyst!&lt;br&gt;
&lt;br&gt;
&amp;gt; Well for me, I'd just as soon have it change directory immediately&lt;br&gt;
&amp;gt; upon selecting the m-file that you're going to work with.  So you&lt;br&gt;
&amp;gt; click on the filename in the &quot;task bar&quot; (or whatever you call it) and&lt;br&gt;
&amp;gt; the code window switches to the code for that m-file, and then I'd&lt;br&gt;
&amp;gt; like it to change the current folder right then - why wait until you&lt;br&gt;
&amp;gt; run it (by clicking on the green triangle).  If you changed only after&lt;br&gt;
&amp;gt; you ran it, then you have this intermediate state where the displayed&lt;br&gt;
&amp;gt; code and the current folder don't match.  Then after you click &quot;run&quot;&lt;br&gt;
&amp;gt; they do match.  So I don't want the discrepancy of having different&lt;br&gt;
&amp;gt; current folders when looking at some code, depending on whether I ran&lt;br&gt;
&amp;gt; the code or not.&lt;br&gt;
&lt;br&gt;
There are 2 fundamental concepts for managing paths: the current directory and the &quot;path&quot; mechanism, which means a list of paths in a specific order to look for searches files in.&lt;br&gt;
They are really good concepts, therefore we find them for a variety of operating systems and development environments. Of course Matlab must be compatible with these established concepts.&lt;br&gt;
&lt;br&gt;
1. If I'm working with an M-file, I absolutely do not want the current folder to be changed. E.g. if I CD to a directory with the data file &quot;TestData.mat&quot; and debug the processing function, it would be a hard nonsense, if the file cannot be found anymore due to a missing absolute path. This would destroy the current directory concept!&lt;br&gt;
&lt;br&gt;
2. When I hit the RUN button, the function should behave exactly as if it is called by a standard function call. Otherwise such difference would make the RUN button useless for me. The message, that a function is not in the current path, is valuable for me! E.g. it helps to detect an incomplete path definition. Neither changing the current path nor appending the current path to the Matlab PATH automatically would satisfy my expectations!&lt;br&gt;
&lt;br&gt;
3. Running a function (from command line, main program or RUN button), path management and the current directory concept are 3 distinct jobs. Mixing them would reduce the power of the these concepts.&lt;br&gt;
&lt;br&gt;
I hope the discussion goes on. Perhaps I miss some points in your ideas.&lt;br&gt;
Kind regards, Jan</description>
    </item>
    <item>
      <pubDate>Fri, 09 Oct 2009 19:29:31 -0400</pubDate>
      <title>Re: &quot;Change directory&quot; dialog box</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/262542#686033</link>
      <author>Nathan</author>
      <description>On Oct 9, 12:19&#160;pm, &quot;Jan Simon&quot; &amp;lt;matlab.THIS_Y...@nMINUSsimon.de&amp;gt;&lt;br&gt;
wrote:&lt;br&gt;
&amp;gt; Dear ImageAnalyst!&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Well for me, I'd just as soon have it change directory immediately&lt;br&gt;
&amp;gt; &amp;gt; upon selecting the m-file that you're going to work with. &#160;So you&lt;br&gt;
&amp;gt; &amp;gt; click on the filename in the &quot;task bar&quot; (or whatever you call it) and&lt;br&gt;
&amp;gt; &amp;gt; the code window switches to the code for that m-file, and then I'd&lt;br&gt;
&amp;gt; &amp;gt; like it to change the current folder right then - why wait until you&lt;br&gt;
&amp;gt; &amp;gt; run it (by clicking on the green triangle). &#160;If you changed only after&lt;br&gt;
&amp;gt; &amp;gt; you ran it, then you have this intermediate state where the displayed&lt;br&gt;
&amp;gt; &amp;gt; code and the current folder don't match. &#160;Then after you click &quot;run&quot;&lt;br&gt;
&amp;gt; &amp;gt; they do match. &#160;So I don't want the discrepancy of having different&lt;br&gt;
&amp;gt; &amp;gt; current folders when looking at some code, depending on whether I ran&lt;br&gt;
&amp;gt; &amp;gt; the code or not.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; There are 2 fundamental concepts for managing paths: the current directory and the &quot;path&quot; mechanism, which means a list of paths in a specific order to look for searches files in.&lt;br&gt;
&amp;gt; They are really good concepts, therefore we find them for a variety of operating systems and development environments. Of course Matlab must be compatible with these established concepts.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; 1. If I'm working with an M-file, I absolutely do not want the current folder to be changed. E.g. if I CD to a directory with the data file &quot;TestData.mat&quot; and debug the processing function, it would be a hard nonsense, if the file cannot be found anymore due to a missing absolute path. This would destroy the current directory concept!&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; 2. When I hit the RUN button, the function should behave exactly as if it is called by a standard function call. Otherwise such difference would make the RUN button useless for me. The message, that a function is not in the current path, is valuable for me! E.g. it helps to detect an incomplete path definition. Neither changing the current path nor appending the current path to the Matlab PATH automatically would satisfy my expectations!&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; 3. Running a function (from command line, main program or RUN button), path management and the current directory concept are 3 distinct jobs. Mixing them would reduce the power of the these concepts.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I hope the discussion goes on. Perhaps I miss some points in your ideas.&lt;br&gt;
&amp;gt; Kind regards, Jan&lt;br&gt;
&lt;br&gt;
What I understood is that they would like to be able to disable that&lt;br&gt;
dialog that pops up so they don't have to repeatedly push the &quot;change&lt;br&gt;
directory&quot; button.&lt;br&gt;
There should be an option that when you click a button (such as change&lt;br&gt;
directory) in that dialog box, that asks you if you would like to keep&lt;br&gt;
this setting for future reference rather than having to do it each and&lt;br&gt;
every time.&lt;br&gt;
For people like you, you could ignore that option and have the dialog&lt;br&gt;
pop up every time.&lt;br&gt;
For people like Image Analyst and Andre, they could select the option&lt;br&gt;
to hide the dialog box and remember their choice the first time they&lt;br&gt;
selected &quot;change directory&quot;.&lt;br&gt;
I would assume that you could re-enable the popup dialog through&lt;br&gt;
matlab preferences (if this is ever implemented), so you can see the&lt;br&gt;
annoying (yet sometimes helpful) dialog pop up once again.&lt;br&gt;
&lt;br&gt;
I think each of you have valid points, but they can coexist in this&lt;br&gt;
functionality.&lt;br&gt;
&lt;br&gt;
-Nathan</description>
    </item>
    <item>
      <pubDate>Fri, 09 Oct 2009 23:52:07 -0400</pubDate>
      <title>Re: &quot;Change directory&quot; dialog box</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/262542#686064</link>
      <author>ImageAnalyst</author>
      <description>Jan:&lt;br&gt;
I know all that and understand all that, and your points are valid for&lt;br&gt;
the way you like to operate.  Nonetheless my opinion remains&lt;br&gt;
unchanged.  By the way, in all important m-files (those which I plan&lt;br&gt;
on other users running on other computers), I ALWAYS constuct full&lt;br&gt;
paths with fullfile() even if I have to go through difficulties to get&lt;br&gt;
the path of the running mfile or executable.  I just like to make&lt;br&gt;
things explicit and remove all ambiguity and requirement or assumption&lt;br&gt;
that the user has a certain search path set up.  If you like to&lt;br&gt;
manually set the current folder, that's fine - I respect your&lt;br&gt;
opinion.  For me, I'd just like the convenience of MATLAB&lt;br&gt;
automatically doing what I always do anyway, and that is to push the&lt;br&gt;
&quot;Change Directory&quot; button when it comes up.</description>
    </item>
  </channel>
</rss>

