4

How to add a path permanantly in matlab and save it?

geoman
  • 73
  • 2
  • 8

2 Answers2

2

Here is The Mathworks' documentation on setting the search path in MATLAB; note the section at the bottom titled "How MATLAB Stores the Search Path" about making changes permanent: http://www.mathworks.com/help/matlab/matlab_env/what-is-the-matlab-search-path.html

Tim Smith
  • 174
  • 7
  • 3
    link dumping is not the correct way ;) to gain rep it is adviced to copy the important parts over and link to the source. – Rinzwind Apr 21 '14 at 05:29
  • i see y'all are a full service shop over here (i don't intend to improve this answer; someone else is welcome to post something more polished) – Tim Smith Apr 21 '14 at 05:35
  • fine. a moderator probably will delete it then ;) – Rinzwind Apr 21 '14 at 05:43
  • @ Tim Smith: I added the path location in pathdef.m file located in "/usr/local/MATLAB/R2012a/toolbox/local". "/usr/local/MATLAB/R2012a" is my matlabroot location. I had to change the permissions of the 'local' folder before editing pathdef.m. It works! – geoman Apr 21 '14 at 13:02
0

Changes to your path will be continued if you add the path to your startup.m file. You can change it in Matlab by entering into the Matlab command window:

edit startup

Then add the path to file the same way you would in the command line

addpath('/path/to/dir');

You can also use startup.m to permanently change figure defaults and most other settings.

Walter
  • 101
  • 1