How to restore overloaded doc function?

Hi,
I foolishly defined a variable called 'doc' in a Matlab script, which was left in the workspace after the script executed. I then attempted to use the 'doc' function to access the Matlab documentation. I get only an HTML version of the Matlab help contents, and those links don't seem to be active. Does anyone know how to bring the 'doc' function and Matlab help back to life?
Thanks for any suggestions. Bob

1 Commento

Jan
Jan il 2 Dic 2013
Modificato: Jan il 2 Dic 2013
What does this exactly mean: "I get only an HTML version of the Matlab help contents, and those links don't seem to be active."? Where did you get the HTML version after which command?
Did you restart Matlab already? Or clear doc?

Accedi per commentare.

Risposte (2)

Wayne King
Wayne King il 2 Dic 2013
Modificato: Wayne King il 2 Dic 2013
I share Jan's puzzle as well, I would have expected a message like:
"Error: "doc" was previously used as a variable, conflicting with its use here as the name of a function or command."
but can't you just clear that variable
clearvars doc
Then if you enter
which doc
You should get something ending in
matlab\toolbox\matlab\helptools\doc.m
Robert
Robert il 2 Dic 2013
Sorry for my poor description. Normally the 'doc' function brings up the documentation in the familiar help window with a navigation pane on the left, containing contents and search tabs, and a reading pane on the right with help content (e.g., see first attached image below). After the flub I described, the 'doc' function now gives me a simple list containing links (e.g., second attached image below). If I select 'MATLAB' in the list, I get the second list shown. If I pick, say, 'Matlab functions' in the second window, it goes no further. This behavior persists after clearing everything, and even after restarting Matlab, or restarting the machine.
If I enter 'which doc', I do indeed get the path to doc.m as Wayne suggested. If I execute doc.m, I get the results I've described above. So, apparently 'overloading' is an inaccurate description of what I've done to my Matlab setup. Earlier in the event I did search for settings or preferences that might invoke the unusual behavior of the doc function, but couldn't find anything that seemed to help.
Hope this clears things up a bit. My apologies once again for the misleading description of my problem. Thanks for your interest.
Bob

2 Commenti

Does restarting MATLAB fix it? If not, contact support.
No, I have tried restarting Matlab, and even restarting the computer, and it is the same.
Thanks.

Accedi per commentare.

Categorie

Prodotti

Richiesto:

il 2 Dic 2013

Commentato:

il 3 Dic 2013

Community Treasure Hunt

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

Start Hunting!

Translated by