MATLAB: Do I receive a “web” error message when clicking certain links in MATLAB

brokenlinkMATLABshadowwarning

When I click certain links in MATLAB ('Getting Started', 'Community', 'Learn MATLAB'), I receive the following error message:
Error using web (line 88)
Too many output arguments.
This error message is also generated when clicking any link under the 'See also' section of a help page. Clicking the 'Getting Started' link generates an additional error message as shown below:
Error in helpview (line 283)
web(help_path, '-helpbrowser');
How can I resolve these error messages? The location of these links in MATLAB are shown below.
'Community' and 'Learn MATLAB' links:
Example of 'See also' links generated with the command:
>> help plot
'Getting Started' link:

Best Answer

There are several possible solutions for resolving these error messages:
1) Restore MATLAB search path:
Execute the following commands and check if the issue is resolved:
>> restoredefaultpath
>> rehash toolboxcache
>> sl_refresh_customizations
If resolved, save the new path with:
>> savepath
2) Check for shadowing of the "web" and "helpview" functions:
>> which -all web % Should return only *1* file location
>> which -all helpview % Should return only *2* file locations
If more file locations are outputted than expected, you can change the name of the user-defined function or remove it from the path.
3) Regenerating preferences:
Visit the link below for instructions to regenerate your MATLAB preferences:
4) Debugging 'web.m':
a) In the MATLAB command window, execute the following line:
>> edit web
b) Next, in the 'web.m' file, place a break point on the line of code which says, "e.throwAsCaller;". This should be on line 213.
c) Reproduce the error
d) Execution will stop at the break point. When this occurs, execute the following line:
>> disp(getReport(e,'extended'))
In one case, this command outputted "Error using strip", which pointed to the underlying cause of the issue. The "strip" command was being shadowed by a user-defined function.