COUNTCODE

count coded and commented lines in an m-file
2.6K Downloads
Updated 28 Feb 2006

View License

N = COUNTCODE(MFILE) returns the number of code lines in MFILE. MFILE should be a string containing a name to an existing m-file or asv-file.

[N,M] = COUNTCODE(MFILE) also returns the number M of commented lines in the file. [N,M,S,Q] = ... further returns a cell array of strings S containing all lines of the file (code and comment, but excluding empty lines) and a logical vector Q with ones for the comment lines of S.

Note: this file use <regexp>

Cite As

Jos (10584) (2024). COUNTCODE (https://www.mathworks.com/matlabcentral/fileexchange/10175-countcode), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0