You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
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.
Cite As
Raymond Norris (2026). sloc (https://in.mathworks.com/matlabcentral/fileexchange/3900-sloc), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.0.0.0 (2.36 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0.0 | Bug fixes:
|
