MATLAB Help Report shows No Examples and No See Also Line

조회 수: 8 (최근 30일)
Kapil
Kapil 2020년 1월 10일
댓글: Kapil 2020년 1월 10일
I written a number of help files (functionname_help.m) in the following format
%% functionname
% function description
% goes here
%% SYNTAX
% syntax info goes here
%% Scenario Example 1
% description of example
%% Scenario Example 2
% description of example
%% See also
% references to other similar functions
%% Copyright 2000-2020
When I run the Help Report as below,
helpreport.png
I see following validation errors.
error.JPG
I tried following to fix the example error, however it did not work
%% Example for Scenario 1
Also I am not sure why See Also would not work even though I have that in the Help line.
  댓글 수: 2
Adam Danz
Adam Danz 2020년 1월 10일
When I copy-paste your code into a new m-file named "jff.m" and execute the help() command, it appears as expected.
200110 092734-MATLAB R2019b - academic use.png
Kapil
Kapil 2020년 1월 10일
Running the Help Report is what causes these errors.

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

채택된 답변

stozaki
stozaki 2020년 1월 10일
Hello,
Please see my script.
Examples : Check for examples in the help text. The Help Report performs a case-insensitive search for a help line with "a single-word variant of example".
See Also : Check for a line in the help that begins with the words See also.
See[space]also[space]
% example
% See also
% Copyright 2000-2020
Please refer following URL
Regards,
  댓글 수: 1
Kapil
Kapil 2020년 1월 10일
Unfortunately MATLAB documentation doesn't mention you need to have a space after also.

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

추가 답변 (3개)

Fangjun Jiang
Fangjun Jiang 2020년 1월 10일
편집: Fangjun Jiang 2020년 1월 10일
use %, not %%
and provide real contents for examples and "See also".

Kapil
Kapil 2020년 1월 10일
%% functionname
% function description
% goes here
%% SYNTAX
% syntax info goes here
%%
% Scenario Example 1
% description of example
% Scenario Example 2
% description of example
%%
%
% See also
% references to other similar functions
%%
%
% Copyright 2000-2020
Still getting errors
No Examples
No See also

Kapil
Kapil 2020년 1월 10일
Ok so a space after also !
Thanks that fixed issue. Single-word variant of example was the important detail

태그

Community Treasure Hunt

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

Start Hunting!

Translated by