MATLAB: How to restore the Support Packages path after doing restoredefaultpath

MATLABsimulink

Why do the support packages disappear after I do "restoredefaultpath"? How do I restore the path of the support packages after doing "restoredefaultpath"?

Best Answer

You should do the following:
>> restoredefaultpath
>> a= matlabshared.supportpkg.getSupportPackageRoot()
>> matlabshared.supportpkg.setSupportPackageRoot(a)
Please refer to the Documentation link below for more information:
<https://www.mathworks.com/help/matlab/ref/matlabshared.supportpkg.getsupportpackageroot.html>