Faq get message Path cannot be saved and cannot write to pathdef.m file: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Lyle
(Created page with "===Issue:=== I get the message "Path cannot be saved" and don't seem to have permission to write to my 'pathdef.m' file. What can I do to keep from having to install PLS_Tool...")
 
No edit summary
Line 10: Line 10:


#Find the folder where your Matlab starts up. One way of identifying this folder is to type the command: <br /> <pre>>> userpath </pre>and note the output. This should be the folder like For example, <pre>>> C:\Users\Username\Documents\MATLAB </pre>If this is NOT blank, use step 2 below. If this is blank, type the command: <pre>>> userpath('reset')</pre> and repeat step 1.
#Find the folder where your Matlab starts up. One way of identifying this folder is to type the command: <br /> <pre>>> userpath </pre>and note the output. This should be the folder like For example, <pre>>> C:\Users\Username\Documents\MATLAB </pre>If this is NOT blank, use step 2 below. If this is blank, type the command: <pre>>> userpath('reset')</pre> and repeat step 1.
#Copy the path identified in step 1 (NOTE: discard any semicolon at the end of the userpath folder name!) and type the command: <pre>>> savepath('C:\__PATHNAME__\pathdef.m')</pre>where <code>__PATHNAME__</code> is the folder name identified in step 1. Assuming this command does not give an error, a writable copy of the path should now be saved into the userpath folder. At this point, the PLS_Toolbox installer should work.  
#Copy the path identified in step 1 (NOTE: discard any semicolon at the end of the userpath folder name!) and type the command: <pre>>> savepath('C:\Users\Username\Documents\MATLAB\pathdef.m')</pre>NOTE: the <code>Username</code> part of the path will be different for your system. Assuming this command does not give an error, a writable copy of the path should now be saved into the userpath folder. At this point, the PLS_Toolbox installer should work.  





Revision as of 10:05, 11 February 2020

Issue:

I get the message "Path cannot be saved" and don't seem to have permission to write to my 'pathdef.m' file. What can I do to keep from having to install PLS_Toolbox each time I start Matlab?

Possible Solutions:

In some cases, Matlab will be installed where you cannot save the Matlab path. This will usually be observed by error messages regarding saving of the path or by the fact that the path resets itself when you restart Matlab. A quick test to see if you can save your path is to run the command savepath. If this returns an error, you should use this FAQ to help work-around the problem.

Preferred Solution

  1. Find the folder where your Matlab starts up. One way of identifying this folder is to type the command:
    >> userpath 
    and note the output. This should be the folder like For example,
    >> C:\Users\Username\Documents\MATLAB 
    If this is NOT blank, use step 2 below. If this is blank, type the command:
    >> userpath('reset')
    and repeat step 1.
  2. Copy the path identified in step 1 (NOTE: discard any semicolon at the end of the userpath folder name!) and type the command:
    >> savepath('C:\Users\Username\Documents\MATLAB\pathdef.m')
    NOTE: the Username part of the path will be different for your system. Assuming this command does not give an error, a writable copy of the path should now be saved into the userpath folder. At this point, the PLS_Toolbox installer should work.


Alternative Solution

  1. Type the command:
    >> which pathdef.m
    and note the folder.
  2. Type the command:
    >> userpath('reset');userpath
    and note the folder (ignore the ; at the end of the folder name)
  3. Copy (Do Not Move, COPY) the file identified in step 1 into the folder identified in step 2.


Still having problems? Please contact our helpdesk at helpdesk@eigenvector.com