"Doctor61" wrote in message <email@example.com>...
> No the problem is I am logged in as another user and this user was a previous user of this computer. I don't have the admin privileges and this seems to be the issue since MATLAB can't access the documents in another user's account. But I don't know why and how the directory was set to that account's My Documents.
I suggest checking the 'startup.m' file (in 'C:\Program Files\MATLAB\R2012a\toolbox\local' on my Windows 7 machine) to see if it sets the path to that account's 'My Documents'.
You can easily enough write your own 'startup.m' and have it add your path instead. See 'path', 'matlabpath', 'addpath' and related functions for details on how to do this. (Add '#' or something else to any existing 'startup.m' file so it won't be executed but will still exist if you need to refer to it or re-enable it in the future.)
I have my own 'startup.m' add the 'My Documents\MATLAB' and all its subdirectories to MATLAB's search path at startup. It makes life miuch easier. I have a copy of my 'startup.m' in one of my 'My Documents\MATLAB' subdirectories, and simply copy it to the 'toolbox\local' subdirectory once every time I install a new version of MATLAB.