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

Jan
Jan 2013년 12월 2일
편집: Jan 2013년 12월 2일
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?

댓글을 달려면 로그인하십시오.

답변 (2개)

Wayne King
Wayne King 2013년 12월 2일
편집: Wayne King 2013년 12월 2일

0 개 추천

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 2013년 12월 2일

0 개 추천

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

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

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

질문:

2013년 12월 2일

댓글:

2013년 12월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by