program_statistics
This simple m-file compiles some statistics about a program. A report is printed; statistics can be optionally returned in a structure.
The statistics include:
* number of files,
* number of functions and GUIDE-related functions,
* number of lines, words and characters,
* number of pages required to print out the whole program.
It features recursive subdirectory search and inclusion of any type of text file (e.g. ".c" to take compiled dll libraries into account).
More on http://ltcmail.ethz.ch/cavin/CSEDBLib.html#PROGSTAT
Example of report:
==================
Number of folders parsed: 44
Number of code folders: 8 (22.125 files per folder)
Number of files: 177
- including 588 functions (3.322 functions per file),
- including 25 GUI dialog callback files made with GUIDE,
(linked with .fig files weighting 657.3438 Kb)
- including 335 GUIDE-related functions,
- including 253 other functions (1.6645 functions per file).
Number of lines: 40600
- distributed in 172234 words,
- including 2774 (6.8325%) separation lines,
- including 8606 (21.197%) lines of comments,
- including 29220 (71.9704%) lines of code.
Number of characters: 1549343
- including 407452 (26.2984%) comment characters,
- including 1141891 (73.7016%) code characters.
To print the whole program, 1014 A4-pages would be necessary.
Cite As
Laurent Cavin (2024). program_statistics (https://www.mathworks.com/matlabcentral/fileexchange/5320-program_statistics), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Acknowledgements
Inspired: plot circle with point on the centre x=0.5 , y=0.5
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |