All of the MATLAB Path information is saved in the pathdef.m file. What you can do is save the pathdef.m file from your current installation of MATLAB before you uninstall it. With normal installation settings, you can usually find pathdef.m file in the following directory:
We suggest uninstalling MATLAB rather than installing on top of a current installation.
After the new version of MATLAB is installed:
1. Open the old pathdef.m file and the new pathdef.m file.
2. Copy and paste all of the directories you wish to keep on the MATLAB Path from the old pathdef.m file into the new pathdef.m file. The new pathdef.m file should already have the MATLAB and Toolbox directories listed, so you should only have to add your personal directories.
3. Save the new pathdef.m file.
4. Open MATLAB and run the PATHDEF command.
5. Run the PATH command to make sure the path was set up properly.