sloc

Count lines of source code for an M-file
ダウンロード: 6.7K
更新 2006/3/9

ライセンスの表示

Counts the lines of source code in an M-file.

A line of source code is defined to be not a comment line, not a continuation of a previous line, and not an empty line.

The function line is included. SLOC returns the line count for the entire file, not for individual functions of a file.

If more than more statement is on the same line, that it treated as one line. For example, the line:

minx = 32; maxx = 100;

is one line of source code.

引用

Raymond Norris (2026). sloc (https://jp.mathworks.com/matlabcentral/fileexchange/3900-sloc), MATLAB Central File Exchange. に取得済み.

MATLAB リリースの互換性
作成: R13
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersWorkspace Variables and MAT Files についてさらに検索
バージョン 公開済み リリース ノート
1.0.0.0

Bug fixes:
(1) The MATLAB Profiler does not include the "function" line in it's metrics, so do not count the "function" line or any "function" lines for subfunctions. (2) Also, functions (particulary nested) may be indented, so minor fix for that.