|
"Jeff Evans" <evansj18.noSpamPlease@msu.edu> wrote in message
news:h2afbf$cu8$1@fred.mathworks.com...
> Hello all,
>
> Beginning yesterday I have been receiving an error when I run two scripts
> (using F5 from the editor) called randomregression.m and
> checkSummerDDfcn.m. Both are in the same folder, which is on the search
> path. There are no files in my file system with conflicting names. They
> ran without error for several weeks previously.
>
> The error for the first file reads:
> "MATLAB cannot run this file because C:\...Refit DD
> function\randomregression.m shadows it in the working directory. To run
> this file you must change the MATLAB current directory."
>
> The first two lines of each script are:
> clear all; close all;
> cd('C:\...Refit DD function\');
>
> Commenting out the cd line does not help.
> Deleting the branch of the path containing this directory and resetting it
> I was able to run the second function once without the error, but then it
> reappeared. Repeating this action was not effective.
>
> I moved one of the files up one folder level, ran it once without error,
> but the error reappeared the second time I ran it from this directory. I
> put it back in the original folder, ran it once without error, but then
> the error reappeared. Same thing.
>
> Any idea what's going on here?
Do you add the directory containing the scripts to the path using ADDPATH
inside one of the scripts? If so, try commenting out that line or those
lines in your scripts and see if that resolves the problem.
--
Steve Lord
slord@mathworks.com
|