where can i find all the special comment properties ?

75 ビュー (過去 30 日間)
OMKARAM RAJESHWARA RAJU
OMKARAM RAJESHWARA RAJU 2020 年 8 月 15 日
編集済み: Philipp 2025 年 3 月 10 日
as i am going through the codes i can see some special comments
%#ok<SAGROW>
%#ok<AGROW>
%#ok<NOPTS>
where can i find all such special comment properties.
if possible please share a link of such documentation.
thanks in advance..!

採用された回答

John D'Errico
John D'Errico 2020 年 8 月 15 日
These are flags to allow you to supress specific MATLAB code analyzer warnings.
Perhaps best, read here:
As MATLAB has evolved over the years, the need for specific warnings has also evolved. So I don't know of a specific hard list of all possible warnings.
You can also look at the MATLAB preferences for the Code Analyzer.
  3 件のコメント
OMKARAM RAJESHWARA RAJU
OMKARAM RAJESHWARA RAJU 2020 年 10 月 20 日
編集済み: OMKARAM RAJESHWARA RAJU 2020 年 10 月 20 日
sir, where can i find the list for specific version of matlab..?
Now i'm using R2020b
Philipp
Philipp 2025 年 3 月 10 日
編集済み: Philipp 2025 年 3 月 10 日
You can suppress any of these warning by just adding
%#ok
behind your codeline to show that you are aware of that warning. At least in R2022b this works for me.

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

その他の回答 (1 件)

Image Analyst
Image Analyst 2020 年 8 月 15 日
  1. Type control-shift-f.
  2. In the "Find files containing text" field, put %#ok<
  3. In the "Include only file type(s):" field, select *.m
  4. Select the current folder, or any other folder you want.
  5. Check "Include subfolders" checkbox.
  6. Click Find
This will find all places in your m-files where the author put lines like that.
If you actually want to know what those symbols mean, then check the other answer(s).

カテゴリ

Help Center および File ExchangeFile Operations についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by