MATLAB Answers

Warning: Name is nonexistent or not a directory

조회 수: 1,715(최근 30일)
Jonathan
Jonathan 3 Jul 2012
댓글: Image Analyst 19 Nov 2020 1:35
Every time I start up MATLAB, I receive this message:
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\mexw32.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\special.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\sift.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\plotop.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\mser.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\misc.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\kmeans.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\imop.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\geometry.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox\aib.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\vlfeat\toolbox.
Warning: Name is nonexistent or not a directory: xml_toolbox.
Warning: Name is nonexistent or not a directory:
C:\POSTDOC\Hand_Mathias\videoIO.
How do I fix this?

  댓글 수: 4

표시 이전 댓글 수: 1
Jonathan
Jonathan 5 Jul 2012
None of these directories exist on the machine. When I try to edit the startup.m file, it tells me that startup.m does not exist.
Lue XIONG
Lue XIONG 19 Nov 2020 0:42
Dear all programmer,
Please help me, how to solve this problem as the paste below:
In addpath (line 86)
In startup (line 2)
Warning: Name is nonexistent or not a directory: D:\solvers\cvx
> In path (line 109)
In addpath (line 86)
In startup (line 3)
Warning: Executing startup failed in matlabrc.
This indicates a potentially serious problem in your MATLAB setup, which should be resolved as soon as possible. Error detected was:
MATLAB:UndefinedFunction
Unrecognized function or variable 'cvx_setup'.
Image Analyst
Image Analyst 19 Nov 2020 1:35
Looks like your startup.m file is trying to cd to D:\solvers\cvx and that folder does not exist. Remmove line 2 from start.m and save it and then run it. It should not NOT try to go to that folder, and perhaps complete the rest of your startup.m code successfully.

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 4 Jul 2012
편집: Image Analyst 5 Oct 2020
Check your startup.m file by typing "edit startup.m" on the command line. If everything looks fine there (no addpaths with non-existent folders) then as a last resort you can issue the line
restoredefaultpath
savepath
to get back to initial "right out of the box" conditions.
Or (if there are some folders in the path you'd still like to keep on the path) go to the "Home" tab of the tool ribbon, click the SetPath icon. Then locate the missing folders, highlight them, click Remove, Save, and Close. You should not see the missing folders listed the next time you start MATLAB.

  댓글 수: 4

표시 이전 댓글 수: 1
Albert Yam
Albert Yam 5 Jul 2012
You can also get to the pathing through
File > Set Path..
and manually remove (or default) the pathing there.
Image Analyst
Image Analyst 5 Jul 2012
Did you try restoredefaultpath? If so, I'm surprised that didn't fix it. Since this is an installation/startup issue, I think the Mathworks will give you free telephone help on it.
Alexandra Braig
Alexandra Braig 16 Nov 2020 10:28
I had the same problem. Your solution (restoredefaultpath; savepath) worked. After setting the path at the next run the warnings did not appear again. Thank you!

댓글을 달려면 로그인하십시오.

추가 답변(5개)

Srichakradhar Reddy Nagireddy
>> edit pathdef.m
  • Remove the directories that are causing the error.
  • Save the file and restart matlab, you will notice that you no longer have the error.

  댓글 수: 9

표시 이전 댓글 수: 6
Walter Roberson
Walter Roberson 3 Jul 2017
You can also use pathtool to edit the path.
Shuya Zhong
Shuya Zhong 18 May 2020
Also solved my problem.
I have changed the initial working folder when MATLAB starts but still had the error. After trying your way, it totally solved my problem. Thanks!
Kepller Liu
Kepller Liu 5 Oct 2020
very good solution!
the bad path is not in the "set path" GUI but still in "pathdef.m".

댓글을 달려면 로그인하십시오.


JRMel
JRMel 5 Mar 2015
편집: JRMel 5 Mar 2015
I am having a very similar problem. I get the error below every time I start matlab. I no longer have the crp toolbox. However, the problem paths are not listed when I go to File > Set Path or in pathdef.m
restoredefaultpath savepath --> This doesn't fix the problem
Here are the errors:

  댓글 수: 2

Image Analyst
Image Analyst 5 Mar 2015
Does that folder exist? Start a new question and attach your startup.m file. You're probably cd'ing to that folder and it's not there.
JRMel
JRMel 7 Mar 2015
Oh that actually helped me solve the problem! The startup file had a couple of addpath lines to those non-existing files. Thank you very much!

댓글을 달려면 로그인하십시오.


Vicente
Vicente 11 Sep 2015
I have a similar problem. When I first open MATLAB, I see those same warnings, name non existant or not a directory, but I know what's the cause. I have formatted my pc, and somehow Microsoft managed to change my computer User name from what it was previously. Now, I can't run any of my models. Can anyone help me with fixing this problem please?

  댓글 수: 1

Walter Roberson
Walter Roberson 11 Sep 2015
Vicente, consider making a shortcut or symbolic link for the old directory name to point to your current directory name.

댓글을 달려면 로그인하십시오.


omid
omid 6 Apr 2018
Go to File>set path> Defaults> save> close then restart matlab

  댓글 수: 0

댓글을 달려면 로그인하십시오.


Manoj Shukla
Manoj Shukla 1 Apr 2020
Hi Team,
Please provide the solution for step by step
I am having a very similar problem. I get the error below every time I start matlab. I no longer have the crp toolbox. However, the problem paths are not listed when I go to File > Set Path or in pathdef.m
restoredefaultpath savepath --> This doesn't fix the problem
Here are the errors: Offline & Online
>> submit()
Warning: Name is nonexistent or not a directory: C:\Users\lenovo\MATLAB Drive\.\lib
> In path (line 109)
In addpath (line 86)
In submit (line 2)
Warning: Name is nonexistent or not a directory: C:\Users\lenovo\MATLAB Drive\.\lib\jsonlab
> In path (line 109)
In addpath (line 86)
In submitWithConfiguration (line 2)
In submit (line 45)
'parts' requires one of the following:
Automated Driving Toolbox
Navigation Toolbox
Robotics System Toolbox
Sensor Fusion and Tracking Toolbox
Error in submitWithConfiguration (line 4)
parts = parts(conf);
Error in submit (line 45)
submitWithConfiguration(conf);
Thanks & Regards,
Manoj Shukla

  댓글 수: 2

Image Analyst
Image Analyst 1 Apr 2020
Open the files it tells you to and change any occurrence of "C:\Users\lenovo\MATLAB Drive" to some folder that you actually DO have.
Walter Roberson
Walter Roberson 2 Apr 2020
The code for some of the functions for submitWithConfiguration has some lines in which parts is a function, and also has some lines in which parts is a variable. Recent changes in the way MATLAB finds functions and variables say that when you use a single name as a function and a variable in the same routine, that MATLAB is permitted to assume that the name only refers to a variable, and then to complain when the variable does not yet exist at the time that the name was intended to be a function call. You need to edit the code so that uses some other variable name rather than parts

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by