Live function with optional arguments: doc has strange behavior

I am creating live function with optional argument. Below is an example. When we use the command
doc optionalArgs
to generate the documentation for the live function, we have this result (screen capture) below.
The optional arguments are repeated many times in the Syntax sessions. My actual program has many optional arguments and the generated document showing a lot of repeating "options".
Any suggestion to correct this or this is bug?
===========================
Brief summary of this function.
Detailed explanation of this function.
function z = optionalArgs(x, y, options)
arguments
x (1, 1) double
y (1, 1) double
options.OptArg1 (1, 1) string = 'A'
options.OptArg2 (1, 1) logical = true
options.OptArg3 (1, 1) double = 3
end
z = x + y + options.OptArgs3;
end

6 件のコメント

Chunru
Chunru 2022 年 7 月 16 日
Chunru
Chunru 2022 年 7 月 19 日
編集済み: Chunru 2022 年 7 月 19 日
Does any one care to take a look?
Walter Roberson
Walter Roberson 2022 年 7 月 19 日
Mathworks Support does not read these posts.
Chunru
Chunru 2022 年 7 月 19 日
@Walter Roberson So I should do a bug report?
Walter Roberson
Walter Roberson 2022 年 7 月 19 日
yes.
Chunru
Chunru 2022 年 7 月 19 日
Got it. Thanks.

サインインしてコメントする。

回答 (0 件)

カテゴリ

質問済み:

2022 年 7 月 16 日

コメント済み:

2022 年 7 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by