From: Sean on
"David MacKinnon" <david.mackinnon(a)nrc-cnrc.gc.ca> wrote in message <i226j8$tf$1(a)fred.mathworks.com>...
> "Andy " <myfakeemailaddress(a)gmail.com> wrote in message <i22586$5uh$1(a)fred.mathworks.com>...
> > "David MacKinnon" <david.mackinnon(a)nrc-cnrc.gc.ca> wrote in message <i220no$ick$1(a)fred.mathworks.com>...
> >
> > Have you tried restoredefaultpath? If that doesn't work, have you called tech support? Either of these seems preferable to re-installation.
>
> I tried restoredefaultpath but it doesn't work. Literally, the script throws an error. Here is the result:
>
> ____________________________
> ??? Error using ==> restoredefaultpath
> System error: 'C:\Program' is not recognized as an internal or external command,
> operable program or batch file.
>
> Command executed: C:\Program Files\MATLAB704\sys\perl\win32\bin\perl.exe "C:\Program Files\MATLAB704\toolbox\local\getphlpaths.pl" "C:\Program Files\MATLAB704"
>
> Error in ==> restoredefaultpath at 45
> error('MATLAB:restoredefaultpath:PerlError','System error: %s\nCommand executed: %s', ...
> _________________________________
>
> It appears that when it calls pearl it doesn't use the DOS 8.3 format for the directory name so halts when it tries to run "C:\Program" part of the call.
>
> I haven't tried tech support yet but will try that once I've run out of options I can do myself.


'What' is the result of typing:
>>what
into the command window. It should give you m-files and .mat files.
From: Walter Roberson on
David MacKinnon wrote:

> I'm afraid not. All the files have .m extensions. Specifically, they are
> files I was executing previously and have not been changed. Same with
> any new "test" files (single line disp() output files) I create. Moving
> them to a different directory allows me to run them until Matlab decides
> to no longer run them.

Do they stop working immediately after you give a "rehash" command?

Is it possible that these directories you are using are underneath one of the
Matlab installation directories? If so that can cause a lot of problems.
From: David MacKinnon on
"Andy " <myfakeemailaddress(a)gmail.com> wrote in message <i22586$5uh$1(a)fred.mathworks.com>...
> Have you tried restoredefaultpath? If that doesn't work, have you called tech support? Either of these seems preferable to re-installation.

After some testing I will add some information.

First, I was able to run restoredefaultpaths from a DOS window but the problem remains.

Second, although I can't run any functions from the current directory I can use help <fucntionName> to access the help information I put at the start of each file. This was also the case when I encountered the 5-file limit for anything along the added search path: I could access help information from any file but couldn't call the function from either the command line or within a script.

Next: to try the rehash suggestion that arrived as I was writing this...
From: David MacKinnon on
Walter Roberson <roberson(a)hushmail.com> wrote in message <i227et$dmk$2(a)canopus.cc.umanitoba.ca>...
> David MacKinnon wrote:
>
> Do they stop working immediately after you give a "rehash" command?
>
> Is it possible that these directories you are using are underneath one of the
> Matlab installation directories? If so that can cause a lot of problems.

I checked the PATH statement and there are now only the paths to the toolboxes. Previously they were at the top of the search list (first to be searched).

Just tried rehash and no change.

One thought that has come to mind: The specific error I am receiving is as follows:

__________________________
??? Undefined function or variable 'curvatureDetection'.
__________________________

Could Matlab be halting the search when it discovers there is no variable by this name and not proceeding the the usual next step of checking the current directory?

Consider, if I bypass the local variable search by using run to process the script, I receive this error:

____________________________
run curvatureDetection
??? Error using ==> run
Error using ==> evalin
Undefined function or variable 'curvatureDetection'.
_____________________________

I'm not yet sure if this yields any new insight.
From: Jan Simon on
Dear David,

> ??? Error using ==> restoredefaultpath
> System error: 'C:\Program' is not recognized as an internal or external command,
> operable program or batch file.
>
> Command executed: C:\Program Files\MATLAB704\sys\perl\win32\bin\perl.exe "C:\Program Files\MATLAB704\toolbox\local\getphlpaths.pl" "C:\Program Files\MATLAB704"
>
> Error in ==> restoredefaultpath at 45
> error('MATLAB:restoredefaultpath:PerlError','System error: %s\nCommand executed: %s', ...

Something seriously went wrong. RESTOREDEFAULTPATH is thought as an emergency tool, which run even under very strange conditions. Actually the exectuted command should include the perl.exe in double quotes also.

I'd decide for a re-installation of Matlab.
Jan
First  |  Prev  |  Next  |  Last
Pages: 1 2 3
Prev: Publish stylefile
Next: convert rgb movie to greyscale