버전 (2.36 KB) 작성자: Raymond Norris
Count lines of source code for an M-file
다운로드 수: 6.5K
업데이트 날짜: 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 (2024). sloc (, MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R13
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
Help CenterMATLAB Answers에서 Workspace Variables and MAT-Files에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보

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.