slocdir( directoryPath )
Version 1.1.0.0 (977 Bytes) by
Diffy D
Go recursively into folders to count the .m lines of code
A simple recursive function which uses the sloc function to count the number of lines of .m code.
The sloc function can be found here : http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=3900&objectType=file
Cite As
Diffy D (2026). slocdir( directoryPath ) (https://au.mathworks.com/matlabcentral/fileexchange/24000-slocdir-directorypath), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2007b
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on File Operations in Help Center and MATLAB Answers
Tags
Acknowledgements
Inspired by: sloc
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
