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 Kommentar

Jan
Jan am 2 Dez. 2013
Bearbeitet: Jan am 2 Dez. 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?

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Wayne King
Wayne King am 2 Dez. 2013
Bearbeitet: Wayne King am 2 Dez. 2013

0 Stimmen

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 am 2 Dez. 2013

0 Stimmen

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 Kommentare

Sean de Wolski
Sean de Wolski am 3 Dez. 2013
Does restarting MATLAB fix it? If not, contact support.
Robert
Robert am 3 Dez. 2013
No, I have tried restarting Matlab, and even restarting the computer, and it is the same.
Thanks.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Startup and Shutdown finden Sie in Hilfe-Center und File Exchange

Produkte

Gefragt:

am 2 Dez. 2013

Kommentiert:

am 3 Dez. 2013

Community Treasure Hunt

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

Start Hunting!

Translated by