Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: 'ghost' path?
Replies: 4   Last Post: May 12, 2010 8:57 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 12,974
Registered: 12/26/06
Re: 'ghost' path?
Posted: May 12, 2010 8:57 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On May 12, 7:49 pm, "Theophane " <theo.we...@hotmail.com> wrote:
> ImageAnalyst <imageanal...@mailinator.com> wrote in message <1dc04772-5350-4ef2-9ac6-e9f9b2145...@l28g2000yqd.googlegroups.com>...
> > Try rmpath, passing it the path that no longer exists.  Then call
> > savepath.

> Didn't work :/
> the specified directory is not in the path, matlab says (quite justifiably so, since this directory does not exist).

It DOES work. I just tried it. Twice! And I'll show you how.
Initially I had this in my startup.m file:

addpath(genpath('C:\Program Files\MATLAB\Work'));
cd 'C:\Program Files\MATLAB\work'

and all was well with the world. Then I exited MATLAB (required in
order to rename a folder it's using). I renamed my work folder to
work1 and relaunched MATLAB. All hell broke loose. MATLAB then
complained about numerous missing folders in a volcanic explosion of
barf to the command window.

I then edited the startup.m file to put in take out the above lines
and put these in:

rmpath(genpath('C:\Program Files\MATLAB\Work'));
addpath(genpath('C:\Program Files\MATLAB\Work1'));
cd 'C:\Program Files\MATLAB\work1'

I then saved it, and restarted MATLAB. It complained at first in the
same way, because it was checking the folders before it ran the
startup.m file. But then the startup.m file ran and "fixed" it. I
simply exited MATLAB and restarted it . . . and everything was fine.
MATLAB started up with a smile, the birds were singing, and all was
again well with the world. No supernova of vomit to the command

Then just to verify, I renamed my folder back to work (from work1) and
repeated the process. It worked just like I explained.

Once you have it working with no error messages, you can delete the
rmpath() command from your startup.m file if you want.

I don't know if this is the most direct and straightforward way of
doing it, but I know it works. All it takes is restarting MATLAB
twice. If you want to fix your problem, you can do this also.

Good luck,

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2016. All Rights Reserved.