For MATLAB 7.6 (R2008a), follow the steps listed below.
- Start MATLAB
- Go to File-->Set Path...
- In the MATLAB search path window, highlight the default directory you want removed, e.g. "C:\My Documents\MATLAB"
- Click Remove
- Click Save
- Click Close
- Manually delete the default directory
- The next time MATLAB restarts, it should no longer create that directory
For MATLAB 7.5 (R2007b), put the following MATLAB script file in your startup directory:
x=pwd;
cd('$yourMyDocumentsPath\')
!rmdir MATLAB
cd(x);
where $yourMyDocumentsPath is your My Documents directory. Run this script file after starting MATLAB. The above script will delete the 'MATLAB' folder in 'My Documents' when the session of MATLAB is ended.
Best Answer