MATLAB Answers

Is there a direct way to count the coded lines in a MATLAB file in MATLAB 6.5 (R13)?

28 ビュー (過去 30 日間)
MathWorks Support Team
MathWorks Support Team 2010 年 1 月 18 日
コメント済み: Rik 2021 年 3 月 30 日
I am looking for a command which returns the number of coded lines included in my MATLAB file. I am aware about the FGETL function but I have to use it in a while or for loop.

採用された回答

MathWorks Support Team
MathWorks Support Team 2021 年 2 月 2 日
編集済み: MathWorks Support Team 2021 年 3 月 30 日
この 回答 は 1 人のコントリビューターによってフラグが設定されました
The ability to count the coded lines in a MATLAB file is not directly available in MATLAB. However, you may be able to write a MATLAB file that does this.
An example of such a function is attached to this solution. Alternatively, you may also visit the MATLAB Central web site at the following URL to see if someone else has already tried something similar to what you want to achieve:
For example, you could find:
SLOC: Counts the lines of source code in a MATLAB file.
COUNTCODE : count coded and commented lines in a MATLAB file
Note that MathWorks does not guarantee or warrant the use or content of these submissions. Any questions, issues, or complaints should be directed to the contributing author.
  1 件のコメント
Rik
Rik 2021 年 3 月 30 日
There is no attachment, but the text suggests there is.

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

その他の回答 (0 件)

製品

Community Treasure Hunt

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

Start Hunting!

Translated by