MATLAB Answers

MATLAB Help Report shows No Examples and No See Also Line

4 views (last 30 days)
Kapil
Kapil on 10 Jan 2020
Commented: Kapil on 10 Jan 2020
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 Comments

Adam Danz
Adam Danz on 10 Jan 2020
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 on 10 Jan 2020
Running the Help Report is what causes these errors.

Sign in to comment.

Accepted Answer

stozaki
stozaki on 10 Jan 2020
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 Comment

Kapil
Kapil on 10 Jan 2020
Unfortunately MATLAB documentation doesn't mention you need to have a space after also.

Sign in to comment.

More Answers (3)

Fangjun Jiang
Fangjun Jiang on 10 Jan 2020
Edited: Fangjun Jiang on 10 Jan 2020
use %, not %%
and provide real contents for examples and "See also".

  0 Comments

Sign in to comment.


Kapil
Kapil on 10 Jan 2020
%% 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

  0 Comments

Sign in to comment.


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

  0 Comments

Sign in to comment.

Sign in to answer this question.

Tags