Matlab seems to know that the help command is there, at least as far as which() is concerned
>> which -all help
C:\Program Files\MATLAB\R2019a\toolbox\matlab\helptools\help.m
And yet, I get this,
>> help help
help not found.
Use the Help browser search field to search the documentation, or
type "help help" for help command options, such as help for methods.
Any idea why this is happening?

댓글 수: 5

Matt J
Matt J 2019년 11월 11일
What happens with doc help ?
doc help seems to work and so does help doc
>> help doc
doc - Reference page in Help browser
This MATLAB function opens the Help browser.
doc
doc name
See also help, web
Reference page for doc
per isakson
per isakson 2019년 11월 11일
편집: per isakson 2019년 11월 11일
On my R2018b
>> help help
help Display help text in Command Window.
help NAME displays the help for the functionality specified by NAME,
such as a function, operator symbol, method, class, or toolbox.
NAME can include a partial path.
.... in total 43 lines
and type help displays the function in Command Window.
That doesn't help you and I have no idea.
Matt J
Matt J 2019년 11월 11일
편집: Matt J 2019년 11월 11일
So help was discontinued after R2018b. Interesting...
Catalytic
Catalytic 2019년 12월 3일
편집: Catalytic 2019년 12월 3일
Upgraded to R2019b and the problem has disappeared. I'm glad they decided to bring help back in 2019b. I sorely missed it.

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

 채택된 답변

Matt J
Matt J 2020년 12월 6일

0 개 추천

I ran into this problem later. The problem turned out to be that Mathworks help.m file uses a command called strip(). This function was being shadowed by my own strip.m file that was higher in the path. Generally speaking, you need to be sure that help.m and its dependencies are higher on the path than any user-defined mfiles.

댓글 수: 2

John D'Errico
John D'Errico 2020년 12월 6일
In general, that is ALWAYS true. But better, never define a function with the same name as an existing function name in MATLAB. If you do so, then expect arbitrarily random things to break.
Matt J
Matt J 2020년 12월 6일
편집: Matt J 2020년 12월 6일
That doesn't help if your function predates the Mathworks' version, unfortunately... IMHO, functions as critical as help() and doc() should be implemented as a built-in, not as an mfile.

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

추가 답변 (1개)

Steven Lord
Steven Lord 2019년 11월 11일

0 개 추천

The output you posted for help doc doesn't match the help text I see when I run that command. Did you post exactly what you see or did you paraphrase?
In release R2019a, what is the last line of your help.m file? In my installation it is a blank line, line 67. The copyright line (line 41) states 1984-2019. Can you confirm that you see the same?
In my installation, doc.m has 209 lines with line 209 being a blank line. The last function in doc.m is displayFile. The copyright line (line 45) reads 1984-2013. Can you confirm that you see the same?
I'm wondering if you accidentally copied versions of help.m file (and maybe doc.m) from an older release of MATLAB.

댓글 수: 1

Catalytic
Catalytic 2019년 11월 11일
Thank you, Steven. Nothing I posted was paraphrased and regarding everything you have described about help.m and doc.m, I see the same.

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

카테고리

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

태그

질문:

2019년 11월 11일

편집:

2020년 12월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by