Problems with MATLAB2014 folder works

3 views (last 30 days)
Jaime
Jaime on 14 Apr 2014
Hello, I've a problem with MATLAB R2014. When a run a script in the MATLAB folder the scrip is not accepted ('undefined function or variable') , I have to create a new forder. Then, I close Matlab, closing WIN and runing again MATLAB and the error happen again. What is the problem?.
Best regards.
  2 Comments
Preetham Manjunatha
Preetham Manjunatha on 21 Apr 2014
Jaime
,
Even I had the same problem when I installed the Matlab 2014a this morning. If your last installed Matlab version is showing the change folder dialog box then try to import the preferences from the older version if it exists in the C:\Users\UserName\AppData\Roaming\MathWorks\MATLAB\R2014a. Note this path may change accordingly, if so please use PREFDIR in Matlab command window. You can see a folder(s) called R2014a, R____a/b (your old versions if any), just copy and paste carefully to R2014a. Here carefully refers to the very old version to R2014a .pref file may not be compatible. If you are copying from, say R2013 or R2012 or R2011 a/b shall work. But anyways its up to your discretion. If you find particular line in .pref file which solves the issue, then please do post your solution. In anycase if you don't have older preferences folders, then you can get the older version preference folder from other computers where latest matlab is installed, make sure to change the path (its messy), but one solution. Lastly, the cause for this issue are: 1. You didn't saved the preferences, command history files from the old version while uninstalling it. Therefore is has completely removed the preferences from the local/roaming/Mathworks folder. In fact, this led to no preferences import for the new R2014a. 2. Even I rigorously checked the Matlab options/preferences for a check box or radio button with turning that dialog box on/off. Ended up in an unsuccessful attempt! Anyways if you find some other easy solution, please do post. I believe lot of them are having the same situation!
Attention: Mathworks, Matlab team, Please consider this bug.
Thank you,
Salaheddin Hosseinzadeh
Salaheddin Hosseinzadeh on 22 Apr 2014
I have a problem with MATLAB in terms of adding my MATLAB folder in my documents to MATLAB path.
But anytime I restart it's like the settings are restarted! And I have to add MATLAB(located in my documents, where I keep my files) and all it's subfolders to he path each time!
At first I thought I'm not doing what I'm supposed to, but then I made sure it's Mr MATLAB problem and not me! (I don't think if it has anything to do with the version or academic license)
Anyway, so finally the only solution I came up with was to write a program, put it in the MATLAB startup directory ( where startup.m is) which adds MATLAB(in my document) and all it's subfolders to the path and sets them as current directory!
That's how I overcame this problem, once for ever!
Let me know if you want the little script I write ;)

Sign in to comment.

Answers (1)

Sean de Wolski
Sean de Wolski on 21 Apr 2014
First, reset everything
restoredefaultpath
rehash toolboxcache
Does it work now if the function is in the current directory? If it does, great, if not, what is the output from:
which -all your_file
Is it found? If so, run the following:
savepath
If it's not found even though it's in the current directory, contact technical support.

Categories

Find more on Environment and Settings in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!