How do I restore Support Packages after running 'restoredefaultpath'?

My support packages disappeared from the MATLAB path after I ran 'restoredefaultpath'. How do I restore the paths of the support packages after executing 'restoredefaultpath'?

 Accepted Answer

The easiest way is to restart MATLAB. During startup, MATLAB will automatically regenerate the support package paths under the root folder returned by 'matlabshared.supportpkg.getSupportPackageRoot' and add them to the MATLAB path.
However, if you want to restore the support packages paths for the current MATLAB session, you can reset the support package root as follows:
>> a = matlabshared.supportpkg.getSupportPackageRoot();
>> matlabshared.supportpkg.setSupportPackageRoot(a)
The 'setSupportPackageRoot' function will automatically run 'savepath' to save the path for future MATLAB sessions. You may need to have administrative privileges to run this function.
Please refer to the documentation links below for more information:

More Answers (0)

Categories

Products

Release

R2016b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!