from Restore previous working directory on MATLAB Startup by Vihang Patil
This simple program will restore the last working directory on resuming MATLAB

startup.m

Contact us at files@mathworks.com